mirror of
https://github.com/fawney19/Aether.git
synced 2026-09-02 09:20:22 +08:00
fix(provider): 将rust分支的gemini cli端点行为对齐到python分支 (#321)
* fix(provider): 对齐 Vertex/Gemini 上游发包与 Python master - provider-transport: 为 custom+aiplatform 推断 Vertex API key 上下文并统一 URL 构建顺序,复用共享 request_url 构建最终上游地址 - ai-pipeline/gateway: Vertex Gemini 路径改为仅使用 URL query key,不再向上游附带 x-goog-api-key header;同步对齐 standard/admin/test-connection/runtime miss 摘要中的最终 URL - gemini conversion: 按 Python master 输出 Gemini 请求体,补齐 system_instruction / generation_config / tool_config / function_declarations 形态,并移植 Gemini schema 清洗逻辑 - scheduler/executor: 将最终 upstream_url、mapped_model、key_name 写入候选 extra_data,运行时 miss 诊断优先展示真实展开后的上游 URL 便于服务器排障 * fix(provider): 修复 Vertex provider 测试与本地调度链路 * fix(provider): 对齐 Vertex 本地执行与 Rust CI
This commit is contained in:
@@ -619,8 +619,9 @@ async fn load_runtime_miss_candidate_contexts(
|
||||
&candidate,
|
||||
"selected_provider_model_name",
|
||||
),
|
||||
endpoint_url: endpoint
|
||||
.and_then(|value| build_runtime_miss_candidate_endpoint_url(value, decision)),
|
||||
endpoint_url: endpoint.and_then(|value| {
|
||||
build_runtime_miss_candidate_endpoint_url(&candidate, value, decision)
|
||||
}),
|
||||
candidate,
|
||||
}
|
||||
})
|
||||
@@ -671,9 +672,14 @@ fn candidate_extra_data_string(candidate: &StoredRequestCandidate, key: &str) ->
|
||||
}
|
||||
|
||||
fn build_runtime_miss_candidate_endpoint_url(
|
||||
candidate: &StoredRequestCandidate,
|
||||
endpoint: &StoredProviderCatalogEndpoint,
|
||||
decision: Option<&GatewayControlDecision>,
|
||||
) -> Option<String> {
|
||||
if let Some(upstream_url) = candidate_extra_data_string(candidate, "upstream_url") {
|
||||
return Some(upstream_url);
|
||||
}
|
||||
|
||||
let path = endpoint
|
||||
.custom_path
|
||||
.as_deref()
|
||||
|
||||
Reference in New Issue
Block a user