mirror of
https://github.com/openai/codex.git
synced 2026-11-26 23:40:43 +00:00
Add a turn-scoped service tier override (#40616)
## What changed - Add `serviceTierForTurn` to `turn/start` so a newly started turn can override the service tier without changing the thread's saved tier. - Treat `"default"` as standard speed and omitted or `null` values as inheriting the thread tier. - Keep `serviceTier` authoritative for subsequent turns when both fields are supplied, and ignore the turn-scoped override when steering an active turn. ## Testing - Extend the app-server turn-start test to verify both the one-turn `"default"` override and inheritance on the following turn. GitOrigin-RevId: 4c2c4db21d8d31617a7a6e6df65bf54834e72383
This commit is contained in:
@@ -5246,6 +5246,13 @@
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"serviceTierForTurn": {
|
||||
"description": "Override the service tier only when this request starts a new turn. Use \"default\" for standard speed. Omitted or null inherits the thread's tier. Does not change the thread's tier or a turn being steered.",
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"summary": {
|
||||
"anyOf": [
|
||||
{
|
||||
|
||||
+7
@@ -23939,6 +23939,13 @@
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"serviceTierForTurn": {
|
||||
"description": "Override the service tier only when this request starts a new turn. Use \"default\" for standard speed. Omitted or null inherits the thread's tier. Does not change the thread's tier or a turn being steered.",
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"summary": {
|
||||
"anyOf": [
|
||||
{
|
||||
|
||||
+7
@@ -21674,6 +21674,13 @@
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"serviceTierForTurn": {
|
||||
"description": "Override the service tier only when this request starts a new turn. Use \"default\" for standard speed. Omitted or null inherits the thread's tier. Does not change the thread's tier or a turn being steered.",
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"summary": {
|
||||
"anyOf": [
|
||||
{
|
||||
|
||||
@@ -655,6 +655,13 @@
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"serviceTierForTurn": {
|
||||
"description": "Override the service tier only when this request starts a new turn. Use \"default\" for standard speed. Omitted or null inherits the thread's tier. Does not change the thread's tier or a turn being steered.",
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"summary": {
|
||||
"anyOf": [
|
||||
{
|
||||
|
||||
BIN
Binary file not shown.
BIN
Binary file not shown.
@@ -30,6 +30,11 @@ model?: string | null, /**
|
||||
* Override the service tier for this turn and subsequent turns.
|
||||
*/
|
||||
serviceTier?: string | null | null, /**
|
||||
* Override the service tier only when this request starts a new turn.
|
||||
* Use "default" for standard speed. Omitted or null inherits the thread's tier.
|
||||
* Does not change the thread's tier or a turn being steered.
|
||||
*/
|
||||
serviceTierForTurn?: string | null, /**
|
||||
* Override the reasoning effort for this turn and subsequent turns.
|
||||
*/
|
||||
effort?: ReasoningEffort | null, /**
|
||||
|
||||
@@ -4725,6 +4725,7 @@ fn turn_start_params_preserve_explicit_null_service_tier() {
|
||||
permissions: None,
|
||||
model: None,
|
||||
service_tier: None,
|
||||
service_tier_for_turn: None,
|
||||
effort: None,
|
||||
summary: None,
|
||||
output_schema: None,
|
||||
|
||||
@@ -131,6 +131,11 @@ pub struct TurnStartParams {
|
||||
)]
|
||||
#[ts(optional = nullable)]
|
||||
pub service_tier: Option<Option<String>>,
|
||||
/// Override the service tier only when this request starts a new turn.
|
||||
/// Use "default" for standard speed. Omitted or null inherits the thread's tier.
|
||||
/// Does not change the thread's tier or a turn being steered.
|
||||
#[ts(optional = nullable)]
|
||||
pub service_tier_for_turn: Option<String>,
|
||||
/// Override the reasoning effort for this turn and subsequent turns.
|
||||
#[ts(optional = nullable)]
|
||||
pub effort: Option<ReasoningEffort>,
|
||||
|
||||
Reference in New Issue
Block a user