feat(openai): align GPT-5.6 and Codex request contracts

This commit is contained in:
MMEXA
2026-07-11 07:40:12 +08:00
parent bc1da3bf3f
commit dfa121dd5b
178 changed files with 17947 additions and 3541 deletions
@@ -240,6 +240,7 @@ pub fn build_ai_execution_decision_from_plan(
request_id: Some(request_id),
candidate_id,
provider_name,
provider_type: None,
provider_id: Some(provider_id),
endpoint_id: Some(endpoint_id),
key_id: Some(key_id),
@@ -792,6 +793,7 @@ mod tests {
request_id: Some("req_1".to_string()),
candidate_id: Some("candidate_1".to_string()),
provider_name: Some("provider".to_string()),
provider_type: None,
provider_id: Some("provider_1".to_string()),
endpoint_id: Some("endpoint_1".to_string()),
key_id: Some("key_1".to_string()),
@@ -20,6 +20,7 @@ pub struct AiExecutionDecisionResponseParts {
pub request_id: String,
pub candidate_id: String,
pub provider_name: String,
pub provider_type: String,
pub provider_id: String,
pub endpoint_id: String,
pub key_id: String,
@@ -65,6 +66,7 @@ pub fn build_ai_execution_decision_response(
request_id: Some(parts.request_id),
candidate_id: Some(parts.candidate_id),
provider_name: Some(parts.provider_name),
provider_type: Some(parts.provider_type),
provider_id: Some(parts.provider_id),
endpoint_id: Some(parts.endpoint_id),
key_id: Some(parts.key_id),
@@ -209,6 +211,7 @@ mod tests {
request_id: "trace-1".to_string(),
candidate_id: "candidate-1".to_string(),
provider_name: "OpenAI".to_string(),
provider_type: "openai".to_string(),
provider_id: "provider-1".to_string(),
endpoint_id: "endpoint-1".to_string(),
key_id: "key-1".to_string(),
+3
View File
@@ -83,6 +83,8 @@ pub struct AiExecutionDecision {
#[serde(default)]
pub provider_name: Option<String>,
#[serde(default)]
pub provider_type: Option<String>,
#[serde(default)]
pub provider_id: Option<String>,
#[serde(default)]
pub endpoint_id: Option<String>,
@@ -208,6 +210,7 @@ mod tests {
request_id: None,
candidate_id: None,
provider_name: None,
provider_type: None,
provider_id: None,
endpoint_id: None,
key_id: None,