clean up legacy openai cli adapter names

This commit is contained in:
fawney19
2026-04-26 21:12:57 +08:00
parent 5b914aa78c
commit ea3dc3257e
47 changed files with 412 additions and 572 deletions

View File

@@ -1394,7 +1394,7 @@ async fn gateway_records_failed_usage_when_all_local_claude_cli_candidates_are_s
provider_priority: 10,
provider_is_active: true,
endpoint_id: "endpoint-claude-cli-usage-local-miss-1".to_string(),
endpoint_api_format: "openai:cli".to_string(),
endpoint_api_format: "openai:responses".to_string(),
endpoint_api_family: Some("openai".to_string()),
endpoint_kind: Some("cli".to_string()),
endpoint_is_active: true,
@@ -1402,11 +1402,11 @@ async fn gateway_records_failed_usage_when_all_local_claude_cli_candidates_are_s
key_name: "codex".to_string(),
key_auth_type: "bearer".to_string(),
key_is_active: true,
key_api_formats: Some(vec!["openai:cli".to_string()]),
key_api_formats: Some(vec!["openai:responses".to_string()]),
key_allowed_models: None,
key_capabilities: None,
key_internal_priority: 5,
key_global_priority_by_format: Some(serde_json::json!({"openai:cli": 1})),
key_global_priority_by_format: Some(serde_json::json!({"openai:responses": 1})),
model_id: "model-claude-cli-usage-local-miss-1".to_string(),
global_model_id: "global-model-claude-cli-usage-local-miss-1".to_string(),
global_model_name: "gpt-5.4".to_string(),
@@ -1416,7 +1416,7 @@ async fn gateway_records_failed_usage_when_all_local_claude_cli_candidates_are_s
model_provider_model_mappings: Some(vec![StoredProviderModelMapping {
name: "gpt-5.4".to_string(),
priority: 1,
api_formats: Some(vec!["openai:cli".to_string()]),
api_formats: Some(vec!["openai:responses".to_string()]),
}]),
model_supports_streaming: Some(true),
model_is_active: true,
@@ -1449,7 +1449,7 @@ async fn gateway_records_failed_usage_when_all_local_claude_cli_candidates_are_s
StoredProviderCatalogEndpoint::new(
"endpoint-claude-cli-usage-local-miss-1".to_string(),
"provider-claude-cli-usage-local-miss-1".to_string(),
"openai:cli".to_string(),
"openai:responses".to_string(),
Some("openai".to_string()),
Some("cli".to_string()),
true,
@@ -1479,7 +1479,7 @@ async fn gateway_records_failed_usage_when_all_local_claude_cli_candidates_are_s
)
.expect("key should build")
.with_transport_fields(
Some(serde_json::json!(["openai:cli"])),
Some(serde_json::json!(["openai:responses"])),
encrypt_python_fernet_plaintext(
DEVELOPMENT_ENCRYPTION_KEY,
"sk-upstream-openai-cli-usage-local-miss",
@@ -1487,7 +1487,7 @@ async fn gateway_records_failed_usage_when_all_local_claude_cli_candidates_are_s
.expect("api key should encrypt"),
None,
None,
Some(serde_json::json!({"openai:cli": 1})),
Some(serde_json::json!({"openai:responses": 1})),
None,
None,
None,
@@ -1703,7 +1703,7 @@ async fn gateway_keeps_failed_usage_request_capture_lightweight_for_large_local_
provider_priority: 10,
provider_is_active: true,
endpoint_id: "endpoint-claude-cli-usage-local-miss-large-1".to_string(),
endpoint_api_format: "openai:cli".to_string(),
endpoint_api_format: "openai:responses".to_string(),
endpoint_api_family: Some("openai".to_string()),
endpoint_kind: Some("cli".to_string()),
endpoint_is_active: true,
@@ -1711,11 +1711,11 @@ async fn gateway_keeps_failed_usage_request_capture_lightweight_for_large_local_
key_name: "codex".to_string(),
key_auth_type: "bearer".to_string(),
key_is_active: true,
key_api_formats: Some(vec!["openai:cli".to_string()]),
key_api_formats: Some(vec!["openai:responses".to_string()]),
key_allowed_models: None,
key_capabilities: None,
key_internal_priority: 5,
key_global_priority_by_format: Some(serde_json::json!({"openai:cli": 1})),
key_global_priority_by_format: Some(serde_json::json!({"openai:responses": 1})),
model_id: "model-claude-cli-usage-local-miss-large-1".to_string(),
global_model_id: "global-model-claude-cli-usage-local-miss-large-1".to_string(),
global_model_name: "gpt-5.4".to_string(),
@@ -1725,7 +1725,7 @@ async fn gateway_keeps_failed_usage_request_capture_lightweight_for_large_local_
model_provider_model_mappings: Some(vec![StoredProviderModelMapping {
name: "gpt-5.4".to_string(),
priority: 1,
api_formats: Some(vec!["openai:cli".to_string()]),
api_formats: Some(vec!["openai:responses".to_string()]),
}]),
model_supports_streaming: Some(true),
model_is_active: true,
@@ -1758,7 +1758,7 @@ async fn gateway_keeps_failed_usage_request_capture_lightweight_for_large_local_
StoredProviderCatalogEndpoint::new(
"endpoint-claude-cli-usage-local-miss-large-1".to_string(),
"provider-claude-cli-usage-local-miss-large-1".to_string(),
"openai:cli".to_string(),
"openai:responses".to_string(),
Some("openai".to_string()),
Some("cli".to_string()),
true,
@@ -1788,7 +1788,7 @@ async fn gateway_keeps_failed_usage_request_capture_lightweight_for_large_local_
)
.expect("key should build")
.with_transport_fields(
Some(serde_json::json!(["openai:cli"])),
Some(serde_json::json!(["openai:responses"])),
encrypt_python_fernet_plaintext(
DEVELOPMENT_ENCRYPTION_KEY,
"sk-upstream-openai-cli-usage-local-miss-large",
@@ -1796,7 +1796,7 @@ async fn gateway_keeps_failed_usage_request_capture_lightweight_for_large_local_
.expect("api key should encrypt"),
None,
None,
Some(serde_json::json!({"openai:cli": 1})),
Some(serde_json::json!({"openai:responses": 1})),
None,
None,
None,