feat: 增强 provider query 端点选择逻辑,支持 openai:responses 格式与 key 级 api_formats 过滤

- provider_query_selected_fetch_endpoints 支持按 key.api_formats 过滤可用端点
- 端点选择增加 endpoint_supports_rust_models_fetch 检查
- 支持优先级列表之外的自定义 api_format 端点
- 新增 openai:responses 端点的 provider query 集成测试
- 各 crate 补充缺失的 tracing instrument 和小修正
- 前端 Pool 管理页面补充状态逻辑
This commit is contained in:
fawney19
2026-04-09 13:55:18 +08:00
parent b0b40c16ff
commit fe81eafe2c
24 changed files with 380 additions and 37 deletions
@@ -174,7 +174,7 @@ fn respects_existing_codex_request_and_session_headers() {
Some(&"kept-by-rule-request".to_string())
);
assert_eq!(headers.get("session_id"), Some(&"kept-by-rule".to_string()));
assert!(headers.get("conversation_id").is_none());
assert!(!headers.contains_key("conversation_id"));
}
#[test]
@@ -207,5 +207,5 @@ fn skips_conversation_id_for_compact_codex_requests() {
headers.get("session_id"),
Some(&"ab5ecce4f0d110fe".to_string())
);
assert!(headers.get("conversation_id").is_none());
assert!(!headers.contains_key("conversation_id"));
}
@@ -389,8 +389,7 @@ pub(crate) async fn resolve_local_openai_cli_candidate_payload_parts(
execution_strategy,
conversion_mode,
is_antigravity: is_antigravity
|| matches!(antigravity_auth, Some(_))
&& ANTIGRAVITY_ENVELOPE_NAME == "antigravity:v1internal",
|| antigravity_auth.is_some() && ANTIGRAVITY_ENVELOPE_NAME == "antigravity:v1internal",
upstream_is_stream,
transport,
})