mirror of
https://github.com/pchuan98/codex.git
synced 2026-07-01 00:31:56 +08:00
2- Use string service tiers in session protocol (#20971)
## Summary - break service tier session/op/app-server protocol fields from the closed enum to string tier ids - send the service tier string directly through model requests, prewarm, compaction, memories, and TUI/app-server turn starts - regenerate app-server protocol JSON/TypeScript schemas, removing the standalone ServiceTier TS enum ## Verification - just fmt - cargo check -p codex-core -p codex-app-server -p codex-tui - just write-app-server-schema --------- Co-authored-by: Codex <noreply@openai.com>
This commit is contained in:
committed by
GitHub
Unverified
parent
ebd9ec05b4
commit
be1d3cff93
@@ -654,7 +654,7 @@ impl TestCodex {
|
||||
prompt,
|
||||
AskForApproval::Never,
|
||||
PermissionProfile::Disabled,
|
||||
Some(service_tier),
|
||||
Some(service_tier.map(|service_tier| service_tier.request_value().to_string())),
|
||||
/*environments*/ None,
|
||||
)
|
||||
.await
|
||||
@@ -716,7 +716,7 @@ impl TestCodex {
|
||||
prompt: &str,
|
||||
approval_policy: AskForApproval,
|
||||
permission_profile: PermissionProfile,
|
||||
service_tier: Option<Option<ServiceTier>>,
|
||||
service_tier: Option<Option<String>>,
|
||||
environments: Option<Vec<TurnEnvironmentSelection>>,
|
||||
) -> Result<()> {
|
||||
self.submit_turn_with_context(
|
||||
@@ -734,7 +734,7 @@ impl TestCodex {
|
||||
prompt: &str,
|
||||
approval_policy: AskForApproval,
|
||||
permission_profile: PermissionProfile,
|
||||
service_tier: Option<Option<ServiceTier>>,
|
||||
service_tier: Option<Option<String>>,
|
||||
environments: Option<Vec<TurnEnvironmentSelection>>,
|
||||
) -> Result<()> {
|
||||
let (sandbox_policy, permission_profile) =
|
||||
|
||||
@@ -313,7 +313,7 @@ async fn websocket_v2_first_turn_drops_fast_tier_after_startup_prewarm() -> Resu
|
||||
.features
|
||||
.enable(Feature::ResponsesWebsocketsV2)
|
||||
.expect("test config should allow feature update");
|
||||
config.service_tier = Some(ServiceTier::Fast);
|
||||
config.service_tier = Some(ServiceTier::Fast.request_value().to_string());
|
||||
});
|
||||
let test = builder.build_with_websocket_server(&server).await?;
|
||||
|
||||
|
||||
@@ -1948,7 +1948,7 @@ async fn stream_until_complete_with_request_metadata(
|
||||
&harness.session_telemetry,
|
||||
harness.effort,
|
||||
harness.summary,
|
||||
service_tier,
|
||||
service_tier.map(|service_tier| service_tier.request_value().to_string()),
|
||||
turn_metadata_header,
|
||||
&codex_rollout_trace::InferenceTraceContext::disabled(),
|
||||
)
|
||||
|
||||
@@ -445,7 +445,7 @@ async fn assert_remote_manual_compact_request_parity(
|
||||
let mut builder = test_codex().with_auth(auth);
|
||||
if let Some(service_tier) = configured_service_tier {
|
||||
builder = builder.with_config(move |config| {
|
||||
config.service_tier = Some(service_tier);
|
||||
config.service_tier = Some(service_tier.request_value().to_string());
|
||||
});
|
||||
}
|
||||
let harness = TestCodexHarness::with_builder(builder).await?;
|
||||
|
||||
Reference in New Issue
Block a user