mirror of
https://github.com/openai/codex.git
synced 2026-03-05 21:45:28 +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:
@@ -155,6 +155,8 @@ pub struct ResponsesApiRequest {
|
||||
pub stream: bool,
|
||||
pub include: Vec<String>,
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub service_tier: Option<String>,
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub prompt_cache_key: Option<String>,
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub text: Option<TextControls>,
|
||||
@@ -174,6 +176,7 @@ impl From<&ResponsesApiRequest> for ResponseCreateWsRequest {
|
||||
store: request.store,
|
||||
stream: request.stream,
|
||||
include: request.include.clone(),
|
||||
service_tier: request.service_tier.clone(),
|
||||
prompt_cache_key: request.prompt_cache_key.clone(),
|
||||
text: request.text.clone(),
|
||||
generate: None,
|
||||
@@ -197,6 +200,8 @@ pub struct ResponseCreateWsRequest {
|
||||
pub stream: bool,
|
||||
pub include: Vec<String>,
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub service_tier: Option<String>,
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub prompt_cache_key: Option<String>,
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub text: Option<TextControls>,
|
||||
|
||||
@@ -265,6 +265,7 @@ async fn streaming_client_retries_on_transport_error() -> Result<()> {
|
||||
store: false,
|
||||
stream: true,
|
||||
include: Vec::new(),
|
||||
service_tier: None,
|
||||
prompt_cache_key: None,
|
||||
text: None,
|
||||
};
|
||||
@@ -306,6 +307,7 @@ async fn azure_default_store_attaches_ids_and_headers() -> Result<()> {
|
||||
store: true,
|
||||
stream: true,
|
||||
include: Vec::new(),
|
||||
service_tier: None,
|
||||
prompt_cache_key: None,
|
||||
text: None,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user