mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #4050] [Engine] alias_sampling: request defaults per model alias #4890
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#4890
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Niko1221/Strata/pull/4050
Author: @furkangkhsn
Created: 10/25/2026
Status: 🔄 Open
Base:
main← Head:alias-sampling📝 Commits (3)
94fd5ffserve: alias_sampling - request defaults per model alias (request > shared settings > alias > config)d755bf9docs: defaults per model alias (alias_sampling)e790d41serve: alias_sampling - the request's own thinking budget and max_tokens 0 rank as for the shared settings📊 Changes
3 files changed (+213 additions, -3 deletions)
View changed files
📝
docs/DETAILS.md(+1 -0)📝
serve/server.py(+43 -3)➕
serve/test_alias_sampling.py(+169 -0)📄 Description
Problem and result
The only way to pick a server-side setting such as
experimental_speed_projectionper request is a custom request field, and many clients cannot send one. With"alias_sampling": {"<alias>": {<settings>}}, a request naming the alias gets those settings and a request naming the model gets the normal ones, from the same loaded engine.Related discussion
Issue #4048. Scope not yet agreed: draft until you answer.
Approach
parse_alias_sampling()reusesclean_shared_defaults, so the allowed keys and their checks are those of POST /settings.Service.with_sharedfills an alias field only where neither the request (directly or through an equivalent field) nor the shared settings set it. The order is therefore request > shared settings > alias > configsampling/reasoning_effort.alias_sampling,with_sharedreturns the same object as before.Validation
Passed:
python -m unittest discover -t . -s serve -p 'test_*.py'on mainc62d5e3a(0.2.9) + this branch, Linux: 1312 tests, 1 failure:GpuChoice.test_hip_ordinal, which also fails on clean mainc62d5e3a(1298 tests, 2 failures; the other,test_keepawake...early_close, is intermittent here).serve/test_alias_sampling.pyhas 14 tests:max_tokens: 0;modelfield;/v1/models, and the engine command carriescvec=1for the alias andcvec=0for the model name.server.pywas replaced by this branch's file and the launch config was givenuser_argswith a refusal-direction vector,"sampling": {"experimental_speed_projection": false}and an-uncensoredalias./v1/modelslisted both names.strata launchkeptalias_samplingandsamplingacross a restart.Failed: none observed.
Not run: macOS, AMD and Intel engines;
/v1/responses(not covered by design).Limits
/v1/responses.🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.