feat: scope model mappings by endpoint

This commit is contained in:
fawney19
2026-05-07 00:48:15 +08:00
parent 4e9f063385
commit 012f8bcdf7
58 changed files with 731 additions and 101 deletions
@@ -106,6 +106,7 @@ async fn gateway_executes_openai_chat_sync_upstream_stream_via_local_finalize_re
name: "gpt-5-upstream".to_string(),
priority: 1,
api_formats: Some(vec!["openai:chat".to_string()]),
endpoint_ids: None,
}]),
model_supports_streaming: Some(true),
model_is_active: true,
@@ -596,6 +597,7 @@ async fn gateway_executes_openai_chat_cross_format_upstream_stream_via_local_fin
name: "gemini-2.5-pro-upstream".to_string(),
priority: 1,
api_formats: Some(vec!["gemini:generate_content".to_string()]),
endpoint_ids: None,
}]),
model_supports_streaming: Some(true),
model_is_active: true,
@@ -1032,6 +1034,7 @@ async fn gateway_executes_openai_chat_cross_format_tool_use_upstream_stream_via_
name: "claude-sonnet-4-upstream".to_string(),
priority: 1,
api_formats: Some(vec!["claude:messages".to_string()]),
endpoint_ids: None,
}]),
model_supports_streaming: Some(true),
model_is_active: true,
@@ -1485,6 +1488,7 @@ async fn gateway_skips_openai_chat_antigravity_cross_format_sync_candidate_as_tr
name: "claude-sonnet-4-5".to_string(),
priority: 1,
api_formats: Some(vec!["gemini:generate_content".to_string()]),
endpoint_ids: None,
}]),
model_supports_streaming: Some(true),
model_is_active: true,
@@ -1845,6 +1849,7 @@ async fn gateway_executes_openai_chat_cross_format_claude_upstream_sync_via_loca
name: "claude-sonnet-4-upstream".to_string(),
priority: 1,
api_formats: Some(vec!["claude:messages".to_string()]),
endpoint_ids: None,
}]),
model_supports_streaming: Some(true),
model_is_active: true,
@@ -2196,6 +2201,7 @@ async fn gateway_executes_openai_chat_cross_format_gemini_upstream_sync_via_loca
name: "gemini-2.5-pro-upstream".to_string(),
priority: 1,
api_formats: Some(vec!["gemini:generate_content".to_string()]),
endpoint_ids: None,
}]),
model_supports_streaming: Some(true),
model_is_active: true,