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
feat(core): strip unsupported sampling params via model capability registry
Some models (claude-opus-4-7, gpt-5-pro) reject temperature/topP/topK
with a 400. The model router now checks the capability registry before
dispatching and silently strips unsupported sampling parameters.
Extends the existing attachment-only capability system to a generic
multi-dimension registry. The temperature dimension is populated from
models.dev data and auto-updated by the CI regeneration workflow.
Closes#16247
Agents using models that dropped support for `temperature`, `topP`, or `topK` (such as `claude-opus-4-7` or `gpt-5-pro`) no longer crash with a 400 error. The model router now automatically strips unsupported sampling parameters before the request is sent — no configuration or processors needed.
6
+
7
+
```ts
8
+
const agent =newAgent({
9
+
model: 'anthropic/claude-opus-4-7',
10
+
instructions: 'You are a helpful assistant.',
11
+
});
12
+
13
+
// temperature is stripped automatically — no 400 error
0 commit comments