mirror of
https://github.com/fawney19/Aether.git
synced 2026-10-04 08:27:46 +08:00
chore(codex): bump default client version to 0.153.4
This commit is contained in:
@@ -504,8 +504,8 @@ fn projects_uuid_prompt_cache_identity_into_missing_session_headers() {
|
|||||||
);
|
);
|
||||||
assert_eq!(headers.get("x-client-request-id"), None);
|
assert_eq!(headers.get("x-client-request-id"), None);
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
headers.get("user-agent"),
|
headers.get("user-agent").map(String::as_str),
|
||||||
Some(&"codex_cli_rs/0.153.3".to_string())
|
Some(aether_ai_formats::CODEX_CLIENT_USER_AGENT)
|
||||||
);
|
);
|
||||||
assert_eq!(headers.get("originator"), Some(&"codex_cli_rs".to_string()));
|
assert_eq!(headers.get("originator"), Some(&"codex_cli_rs".to_string()));
|
||||||
assert!(!headers.contains_key("version"));
|
assert!(!headers.contains_key("version"));
|
||||||
@@ -614,8 +614,8 @@ fn injects_only_codex_client_headers_for_images_requests() {
|
|||||||
Some(&"acc-123".to_string())
|
Some(&"acc-123".to_string())
|
||||||
);
|
);
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
headers.get("user-agent"),
|
headers.get("user-agent").map(String::as_str),
|
||||||
Some(&"codex_cli_rs/0.153.3".to_string())
|
Some(aether_ai_formats::CODEX_CLIENT_USER_AGENT)
|
||||||
);
|
);
|
||||||
assert_eq!(headers.get("originator"), Some(&"codex_cli_rs".to_string()));
|
assert_eq!(headers.get("originator"), Some(&"codex_cli_rs".to_string()));
|
||||||
assert!(!headers.contains_key("version"));
|
assert!(!headers.contains_key("version"));
|
||||||
@@ -698,8 +698,8 @@ fn preserves_client_context_headers_and_enforces_codex_provider_identity() {
|
|||||||
Some(&"kept-by-rule-request".to_string())
|
Some(&"kept-by-rule-request".to_string())
|
||||||
);
|
);
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
headers.get("user-agent"),
|
headers.get("user-agent").map(String::as_str),
|
||||||
Some(&"codex_cli_rs/0.153.3".to_string())
|
Some(aether_ai_formats::CODEX_CLIENT_USER_AGENT)
|
||||||
);
|
);
|
||||||
assert_eq!(headers.get("originator"), Some(&"codex_cli_rs".to_string()));
|
assert_eq!(headers.get("originator"), Some(&"codex_cli_rs".to_string()));
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
@@ -762,8 +762,8 @@ fn compact_projects_uuid_prompt_cache_identity_into_session_headers() {
|
|||||||
);
|
);
|
||||||
assert_eq!(headers.get("x-client-request-id"), None);
|
assert_eq!(headers.get("x-client-request-id"), None);
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
headers.get("user-agent"),
|
headers.get("user-agent").map(String::as_str),
|
||||||
Some(&"codex_cli_rs/0.153.3".to_string())
|
Some(aether_ai_formats::CODEX_CLIENT_USER_AGENT)
|
||||||
);
|
);
|
||||||
assert_eq!(headers.get("originator"), Some(&"codex_cli_rs".to_string()));
|
assert_eq!(headers.get("originator"), Some(&"codex_cli_rs".to_string()));
|
||||||
assert!(!headers.contains_key("version"));
|
assert!(!headers.contains_key("version"));
|
||||||
|
|||||||
@@ -421,7 +421,7 @@ async fn gateway_executes_codex_image_stream_via_local_decision_gate_after_oauth
|
|||||||
);
|
);
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
seen_execution_runtime_request.headers["user-agent"],
|
seen_execution_runtime_request.headers["user-agent"],
|
||||||
"codex_cli_rs/0.153.3"
|
aether_ai_formats::CODEX_CLIENT_USER_AGENT
|
||||||
);
|
);
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
seen_execution_runtime_request.headers["originator"],
|
seen_execution_runtime_request.headers["originator"],
|
||||||
|
|||||||
@@ -1119,7 +1119,7 @@ async fn gateway_executes_codex_image_sync_via_local_decision_gate_after_oauth_r
|
|||||||
);
|
);
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
seen_execution_runtime_request.headers["user-agent"],
|
seen_execution_runtime_request.headers["user-agent"],
|
||||||
"codex_cli_rs/0.153.3"
|
aether_ai_formats::CODEX_CLIENT_USER_AGENT
|
||||||
);
|
);
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
seen_execution_runtime_request.headers["originator"],
|
seen_execution_runtime_request.headers["originator"],
|
||||||
|
|||||||
@@ -558,7 +558,10 @@ async fn gateway_recovers_codex_slug_only_models_from_a_stale_legacy_cache_impl(
|
|||||||
.expect("mutex should lock") += 1;
|
.expect("mutex should lock") += 1;
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
plan.url,
|
plan.url,
|
||||||
"https://chatgpt.com/backend-api/codex/models?client_version=0.153.3"
|
format!(
|
||||||
|
"https://chatgpt.com/backend-api/codex/models?client_version={}",
|
||||||
|
aether_ai_formats::CODEX_CLIENT_VERSION
|
||||||
|
)
|
||||||
);
|
);
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
plan.headers.get("user-agent").map(String::as_str),
|
plan.headers.get("user-agent").map(String::as_str),
|
||||||
@@ -759,7 +762,10 @@ async fn gateway_handles_admin_provider_query_models_falls_back_to_codex_preset_
|
|||||||
.expect("mutex should lock") += 1;
|
.expect("mutex should lock") += 1;
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
plan.url,
|
plan.url,
|
||||||
"https://chatgpt.com/backend-api/codex/models?client_version=0.153.3"
|
format!(
|
||||||
|
"https://chatgpt.com/backend-api/codex/models?client_version={}",
|
||||||
|
aether_ai_formats::CODEX_CLIENT_VERSION
|
||||||
|
)
|
||||||
);
|
);
|
||||||
Json(json!({
|
Json(json!({
|
||||||
"request_id": "req-provider-query-codex-invalidated",
|
"request_id": "req-provider-query-codex-invalidated",
|
||||||
|
|||||||
@@ -36,8 +36,8 @@ const CODEX_OPENAI_RESPONSES_COMPACT_BODY_FIELDS: &[&str] = &[
|
|||||||
"prompt_cache_key",
|
"prompt_cache_key",
|
||||||
"text",
|
"text",
|
||||||
];
|
];
|
||||||
pub const CODEX_CLIENT_VERSION: &str = "0.153.3";
|
pub const CODEX_CLIENT_VERSION: &str = "0.153.4";
|
||||||
pub const CODEX_CLIENT_USER_AGENT: &str = "codex_cli_rs/0.153.3";
|
pub const CODEX_CLIENT_USER_AGENT: &str = "codex_cli_rs/0.153.4";
|
||||||
pub const CODEX_CLIENT_ORIGINATOR: &str = "codex_cli_rs";
|
pub const CODEX_CLIENT_ORIGINATOR: &str = "codex_cli_rs";
|
||||||
pub const CODEX_OPENAI_IMAGE_INTERNAL_MODEL: &str = "gpt-5.4-mini";
|
pub const CODEX_OPENAI_IMAGE_INTERNAL_MODEL: &str = "gpt-5.4-mini";
|
||||||
pub const CODEX_OPENAI_IMAGE_DEFAULT_MODEL: &str = "gpt-image-2";
|
pub const CODEX_OPENAI_IMAGE_DEFAULT_MODEL: &str = "gpt-image-2";
|
||||||
@@ -2194,11 +2194,19 @@ mod tests {
|
|||||||
parse_codex_auth_identity, project_codex_catalog_model_card,
|
parse_codex_auth_identity, project_codex_catalog_model_card,
|
||||||
resolve_codex_responses_model_capabilities,
|
resolve_codex_responses_model_capabilities,
|
||||||
validate_codex_openai_responses_compact_request_contract, CODEX_CLIENT_ORIGINATOR,
|
validate_codex_openai_responses_compact_request_contract, CODEX_CLIENT_ORIGINATOR,
|
||||||
CODEX_CLIENT_USER_AGENT, CODEX_OPENAI_IMAGE_INTERNAL_MODEL,
|
CODEX_CLIENT_USER_AGENT, CODEX_CLIENT_VERSION, CODEX_OPENAI_IMAGE_INTERNAL_MODEL,
|
||||||
CODEX_OPENAI_RESPONSES_UNSUPPORTED_BODY_FIELDS, CODEX_RESPONSES_LITE_HEADER,
|
CODEX_OPENAI_RESPONSES_UNSUPPORTED_BODY_FIELDS, CODEX_RESPONSES_LITE_HEADER,
|
||||||
};
|
};
|
||||||
use serde_json::{json, Value};
|
use serde_json::{json, Value};
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn codex_client_user_agent_matches_originator_and_version() {
|
||||||
|
assert_eq!(
|
||||||
|
CODEX_CLIENT_USER_AGENT,
|
||||||
|
format!("{CODEX_CLIENT_ORIGINATOR}/{CODEX_CLIENT_VERSION}")
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn model_card_drives_unknown_codex_model_body_and_header_contracts() {
|
fn model_card_drives_unknown_codex_model_body_and_header_contracts() {
|
||||||
let card = json!({
|
let card = json!({
|
||||||
|
|||||||
@@ -1345,7 +1345,10 @@ mod tests {
|
|||||||
"https://chatgpt.com/backend-api/codex"
|
"https://chatgpt.com/backend-api/codex"
|
||||||
),
|
),
|
||||||
Some((
|
Some((
|
||||||
"https://chatgpt.com/backend-api/codex/models?client_version=0.153.3".to_string(),
|
format!(
|
||||||
|
"https://chatgpt.com/backend-api/codex/models?client_version={}",
|
||||||
|
aether_ai_formats::CODEX_CLIENT_VERSION
|
||||||
|
),
|
||||||
"openai:responses".to_string()
|
"openai:responses".to_string()
|
||||||
))
|
))
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -991,7 +991,10 @@ mod tests {
|
|||||||
|
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
plan.url,
|
plan.url,
|
||||||
"https://chatgpt.com/backend-api/codex/models?client_version=0.153.3"
|
format!(
|
||||||
|
"https://chatgpt.com/backend-api/codex/models?client_version={}",
|
||||||
|
aether_ai_formats::CODEX_CLIENT_VERSION
|
||||||
|
)
|
||||||
);
|
);
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
plan.headers.get("authorization").map(String::as_str),
|
plan.headers.get("authorization").map(String::as_str),
|
||||||
|
|||||||
Reference in New Issue
Block a user