Repository navigation
fix: omit unsupported sampling defaults #820
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
seonghobae
wants to merge
15
commits into
ContextualWisdomLab:main
from
seonghobae:fix/omit-unsupported-sampling-defaults
Closed
Changes from 12 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
c335349
fix: omit unsupported sampling defaults
seonghobae 4759dee
fix: pin greenlet in the locked database extra
seonghobae 696d910
fix: preserve explicit sampling across all paths
seonghobae a2e4b01
fix: omit null sampling from structured completions
seonghobae 9d42c51
docs: ground sampling omission in Azure guidance
seonghobae 9580596
Merge remote-tracking branch 'origin/fix/omit-unsupported-sampling-de…
seonghobae d817104
Merge remote-tracking branch 'origin/fix/omit-unsupported-sampling-de…
seonghobae a92d524
test: cover omitted batch sampling
seonghobae 4959e80
refactor: keep one effective temperature state
seonghobae d778e6d
fix: address sampling contract review
seonghobae 7b788ca
fix: isolate request sampling controls
seonghobae 83d1326
fix: scope structured output token limits
seonghobae 79363b0
test: isolate Bytez auth transport from DNS
seonghobae 9cae444
fix(security): isolate local provider registration
seonghobae a185eed
Merge branch 'main' into fix/omit-unsupported-sampling-defaults
opencode-agent[bot] File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| # ADR 0123: Omit Unsupported Sampling Defaults | ||
|
|
||
| - Status: Accepted | ||
| - Date: 2026-08-21 | ||
|
|
||
| ## Context | ||
|
|
||
| Reasoning-capable providers can reject a `temperature` field even when the | ||
| value is a conventional default such as `0.2`. A gateway that invents this | ||
| field before capability negotiation makes an otherwise valid discovered model | ||
| unusable and can turn failover into a false provider outage. Azure's current | ||
| reasoning-model documentation explicitly lists `temperature` among the | ||
| unsupported parameters (Microsoft, 2026). | ||
|
|
||
| ## Decision | ||
|
|
||
| The orchestrator omits `temperature` and other optional sampling controls when | ||
| the caller did not explicitly provide them. The provider and selected model | ||
| therefore own their documented defaults and capability handling. Explicit | ||
| values remain validated at the public request boundary and are forwarded | ||
| unchanged through chat, streaming, batch, and structured-output transport | ||
| paths. A client-level explicit value, including the CLI option, applies to | ||
| ordinary chat as well as streaming and batch calls; a request-scoped value | ||
| temporarily overrides it for both streamed and non-streamed requests. HTTP | ||
| request overrides are isolated from concurrent requests; the server must not | ||
| mutate shared client defaults while a request is in flight. | ||
|
|
||
| The command-line sampling option is optional and defaults to omission. Health | ||
| probes also omit sampling controls; a probe must test reachability without | ||
| assuming that the model accepts a sampling parameter. | ||
|
|
||
| This is a transport-capability contract, not a model-ranking heuristic. Model | ||
| selection and reasoning-effort policy remain governed by the paper-grounded | ||
| model policy ADRs. | ||
|
|
||
| ## Consequences | ||
|
|
||
| - Reasoning models that reject `temperature` can be selected without a local | ||
| model-name exception. | ||
| - Callers that require a sampling value must state it explicitly and accept the | ||
| selected provider's capability response. | ||
| - One request's explicit controls cannot become another request's implicit | ||
| defaults. | ||
| - Provider request assertions must distinguish omitted fields from explicit | ||
| values. | ||
|
|
||
| ## References | ||
|
|
||
| Microsoft. (2026, August 6). *Azure OpenAI reasoning models: GPT-5 series, | ||
| o3-mini, o1, o1-mini*. Microsoft Learn. | ||
| https://learn.microsoft.com/azure/foundry/openai/how-to/reasoning |
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.