You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 9d842d7
Browse filesBrowse the repository at this point in the historyBrowse files
fix(models): say why sim-auto is refused and tidy release follow-ups (#10437)
* fix(workflows): say why sim-auto is refused on a model field
A model field that does not offer Auto, either because the block never does (guardrails, translate) or because the deployment is self-hosted, rejected sim-auto with the generic unknown-model-id error and its namespace examples. It now names the actual reason and points at the block's model.options for a concrete id.
* refactor(mothership): classify a worker-reported cancel without a sentinel abort reason
WorkerTerminalStop was never passed to abort(); it existed only so recordCancelled could feed a live signal through isExplicitStopReason. Branch on the live signal directly instead. The recorded cancel reason is unchanged, and the worker-reported cancel test now also asserts the root span finishes as explicit_stop.
* refactor(urls): inline the single-use ollama url check into isOllamaReachable
* test(blocks): check the agent's serialized provider through the real resolver
The resolveModelProviderId and findConfiguredModelProvider tests asserted on a mocked getProviderFromModel and restated its stub; the real behaviour is covered by the providers utils tests. The agent block now has a real-resolver test that a model reference records the default provider rather than its written namespace, and its tool callback matches the router and evaluator one-liner.
Copy file name to clipboardExpand all lines: apps/sim/lib/workflows/editing/validation-models.test.ts
+6-2Lines changed: 6 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -70,7 +70,9 @@ describe('router and evaluator model fields', () => {
70
70
it('rejects sim-auto on self-hosted Sim, where Auto is never offered',()=>{
71
71
const{ errors, model }=validateModel('router_v2','sim-auto')
72
72
expect(model).toBeUndefined()
73
-
expect(errors[0]?.error).toContain('Unknown model id')
73
+
expect(errors[0]?.error).toBe(
74
+
'Block "router_v2" does not offer Auto ("sim-auto") on a self-hosted deployment; set model to a concrete model id from components/blocks/router_v2.json (the model.options array).'
75
+
)
74
76
})
75
77
})
76
78
@@ -81,7 +83,9 @@ describe('translate and guardrails model fields', () => {
81
83
setEnvFlags({isHosted: true})
82
84
const{ errors, model }=validateModel(blockType,'sim-auto')
83
85
expect(model).toBeUndefined()
84
-
expect(errors[0]?.error).toContain('Unknown model id')
86
+
expect(errors[0]?.error).toBe(
87
+
`Block "${blockType}" does not offer Auto ("sim-auto"); set model to a concrete model id from components/blocks/${blockType}.json (the model.options array).`
// sim-auto is valid only where the source offers Auto, which it does on hosted Sim only.
1020
+
if(isAutoModel(trimmed)){
1021
+
if(modelSource.auto&&isHostedDeployment){
1022
+
return{valid: true,value: trimmed.toLowerCase()}
1023
+
}
1024
+
return{
1025
+
valid: false,
1026
+
error: {
1027
+
blockId,
1028
+
blockType,
1029
+
field: fieldName,
1030
+
value,
1031
+
error: `Block "${blockType}" does not offer Auto ("sim-auto")${modelSource.auto ? ' on a self-hosted deployment' : ''}; set model to a concrete model id from components/blocks/${blockType}.json (the model.options array).`,
0 commit comments