🤖 feat: add per-model provider modelParameters overrides#2743
Conversation
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fe31b1f296
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5681743456
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0d503eae9b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
|
Codex Review: Didn't find any major issues. Nice work! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
1b6caf7 to
90d9d93
Compare
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 90d9d93a8e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Add modelParameters support to providers.jsonc, allowing users to override max_output_tokens, temperature, top_p, and other settings per model or via wildcard (*) fallback. - Schema module with standard parameter shape and compile-time mapping - Resolver with effective → canonical → wildcard precedence - StreamManager threading for call settings overrides - AIService integration with provider extras deep-merge - Colon-safe model ID parsing via getModelName() - Schema-backed runtime validation (invalid values silently dropped) - Prototype-safe standard-key detection via Object.hasOwn() - Plain-object guard for malformed config entries Closes #2574
90d9d93 to
919f928
Compare
|
@codex review |
|
@codex review |
|
Codex Review: Didn't find any major issues. Hooray! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@codex review |
|
Codex Review: Didn't find any major issues. Hooray! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Summary
Add config-driven per-model parameter overrides from
~/.mux/providers.jsoncand thread them through the chat streaming path so standard call settings (for examplemax_output_tokens,temperature, andtop_p) are applied at request time, while provider-specific extra keys are safely merged into provider options.Closes #2574
Background
Users need a way to tune model request parameters without code changes or UI additions. This adds a providers-config surface that supports exact model entries plus wildcard fallbacks and keeps runtime behavior defensive for hand-edited config.
Implementation
modelParametersin provider config, including a single snake_case→AI SDK call-settings mapping source of truth.resolveModelParameterOverrides(...)with precedence:"*"wildcardstandardcall settings (mapped to SDK keys)providerExtras(unknown keys)AIService.streamMessage()and:providerExtrasunder the provider namespacestartStream(..., callSettingsOverrides)streamText(...), with explicit precedence formaxOutputTokens:MUX_DEBUG_LLM_REQUEST=1.Validation
make static-checkbun test src/common/config/schemas/providersConfig.test.ts src/common/utils/ai/modelParameterOverrides.test.ts src/node/services/streamManager.test.ts src/node/services/aiService.test.tsRisks
Generated with
mux• Model:openai:gpt-5.3-codex• Thinking:xhigh• Cost:$13.96