mirror of
https://github.com/openai/codex.git
synced 2026-05-06 06:12:59 +03:00
add fast mode toggle (#13212)
- add a local Fast mode setting in codex-core (similar to how model id is currently stored on disk locally) - send `service_tier=priority` on requests when Fast is enabled - add `/fast` in the TUI and persist it locally - feature flag
This commit is contained in:
@@ -13,6 +13,7 @@ use crate::rollout::policy::should_persist_response_item_for_memories;
|
||||
use codex_api::ResponseEvent;
|
||||
use codex_otel::OtelManager;
|
||||
use codex_protocol::config_types::ReasoningSummary as ReasoningSummaryConfig;
|
||||
use codex_protocol::config_types::ServiceTier;
|
||||
use codex_protocol::models::BaseInstructions;
|
||||
use codex_protocol::models::ContentItem;
|
||||
use codex_protocol::models::ResponseItem;
|
||||
@@ -36,6 +37,7 @@ pub(in crate::memories) struct RequestContext {
|
||||
pub(in crate::memories) otel_manager: OtelManager,
|
||||
pub(in crate::memories) reasoning_effort: Option<ReasoningEffortConfig>,
|
||||
pub(in crate::memories) reasoning_summary: ReasoningSummaryConfig,
|
||||
pub(in crate::memories) service_tier: Option<ServiceTier>,
|
||||
pub(in crate::memories) turn_metadata_header: Option<String>,
|
||||
}
|
||||
|
||||
@@ -144,6 +146,7 @@ impl RequestContext {
|
||||
otel_manager: turn_context.otel_manager.clone(),
|
||||
reasoning_effort: Some(phase_one::REASONING_EFFORT),
|
||||
reasoning_summary: turn_context.reasoning_summary,
|
||||
service_tier: turn_context.config.service_tier,
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -322,6 +325,7 @@ mod job {
|
||||
&stage_one_context.otel_manager,
|
||||
stage_one_context.reasoning_effort,
|
||||
stage_one_context.reasoning_summary,
|
||||
stage_one_context.service_tier,
|
||||
stage_one_context.turn_metadata_header.as_deref(),
|
||||
)
|
||||
.await?;
|
||||
|
||||
Reference in New Issue
Block a user