fix(codex): preserve explicit service tiers and adapt usage badges

This commit is contained in:
ZheFox
2026-09-22 22:19:52 +08:00
parent 0b7c7f94ac
commit 69930a6059
7 changed files with 127 additions and 43 deletions
@@ -9737,7 +9737,10 @@ mod tests {
headers: BTreeMap::from([("content-type".into(), "application/json".into())]),
content_type: Some("application/json".into()),
content_encoding: Some(encoding.into()),
body: RequestBody::from_json(json!({"model": "gpt-4.1"})),
body: RequestBody::from_json(json!({
"model": "gpt-4.1",
"service_tier": "ultrafast"
})),
stream: false,
client_api_format: "openai:chat".into(),
provider_api_format: "openai:chat".into(),
@@ -9758,7 +9761,7 @@ mod tests {
result.body.and_then(|body| body.json_body),
Some(json!({
"content_encoding": encoding,
"body": {"model": "gpt-4.1"},
"body": {"model": "gpt-4.1", "service_tier": "ultrafast"},
}))
);
}