Preserve explicit serviceTier="auto" through the settings picker (PR #5711)
Round 13 P1 finding: the Service tier picker rendered `null` as the displayed `auto` and converted any explicit `auto` selection back to `null`, so the chat-adapter's truthy guard then omitted `service_tier` on the wire. For Anthropic the docs distinguish: - omitting `service_tier` -> provider default - `service_tier="auto"` -> opts into Priority Tier when available - `service_tier="standard_only"` -> opts out Drop the auto -> null conversion so the user's explicit pick reaches the adapter and the wire reflects it. `null` still means "never set" and falls through to the provider default; the existing serviceTier allowlist already includes "auto" everywhere it matters.
This commit is contained in:
parent
67e371934c
commit
4c3be18d00
1 changed files with 6 additions and 4 deletions
|
|
@ -1375,10 +1375,12 @@ export function ChatSettingsPanel({
|
|||
<Select
|
||||
value={params.serviceTier ?? "auto"}
|
||||
onValueChange={(value) => {
|
||||
if (value === "auto") {
|
||||
set("serviceTier")(null);
|
||||
return;
|
||||
}
|
||||
// Store every selected tier verbatim, including the
|
||||
// explicit "auto". On Anthropic the docs distinguish
|
||||
// omitting service_tier (provider default) from
|
||||
// setting "auto" (opt into Priority Tier when
|
||||
// available); preserve the user's choice through to
|
||||
// the adapter so the wire reflects it.
|
||||
const allowed: readonly ServiceTier[] = serviceTierOptions;
|
||||
if (allowed.includes(value as ServiceTier)) {
|
||||
set("serviceTier")(value as ServiceTier);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue