feat(ai-proxy): add defaults field for fallback model options#12895
Open
sihyeonn wants to merge 3 commits intoapache:masterfrom
Open
feat(ai-proxy): add defaults field for fallback model options#12895sihyeonn wants to merge 3 commits intoapache:masterfrom
sihyeonn wants to merge 3 commits intoapache:masterfrom
Conversation
Separate options and defaults behavior: - options: always override user request values - defaults: apply only when not set in user request This allows more flexible configuration where administrators can enforce certain values (via options) while providing sensible defaults for optional parameters. Signed-off-by: Sihyeon Jang <sihyeon.jang@navercorp.com>
Baoyuantop
reviewed
Jan 23, 2026
Contributor
Baoyuantop
left a comment
There was a problem hiding this comment.
- Supplement Documentation - Update ai-proxy.md and ai-proxy.md, adding documentation for the defaults field
- Supplement ai-proxy Plugin Tests - Add test cases to ai-proxy.openai-compatible.t or relevant test files
- Link to Related Issues or Supplement Requirement Context - Specify the source of use cases for this feature
- Add defaults field description to ai-proxy.md (en/zh) - Add instances.defaults field description to ai-proxy-multi.md (en/zh) - Add test cases for defaults field in ai-proxy.openai-compatible.t
Author
|
Thanks for the review! I've addressed your feedback:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Add defaults field to ai-proxy and ai-proxy-multi plugins to provide fallback values for model options. Currently, options field always overrides user request values. This PR introduces a new defaults field that only applies when the user hasn't set a value in their request. Behavior:
Example configuration:
{
"options": { "model": "gpt-4" },
"defaults": { "max_tokens": 512, "temperature": 0.7 }
}
Which issue(s) this PR fixes:
Fixes #
Checklist