mirror of
https://github.com/fawney19/Aether.git
synced 2026-10-08 10:27:46 +08:00
feat(grok): add provider pool and transport support
This commit is contained in:
@@ -9,6 +9,7 @@ use crate::auth::{
|
||||
};
|
||||
use crate::claude_code::build_claude_code_passthrough_headers;
|
||||
use crate::claude_code::local_claude_code_transport_unsupported_reason_with_network;
|
||||
use crate::grok::{is_grok_provider_transport, resolve_grok_session_auth};
|
||||
use crate::kiro::{
|
||||
build_kiro_provider_headers, build_kiro_provider_request_body, is_kiro_provider_transport,
|
||||
local_kiro_request_transport_unsupported_reason_with_network, KiroAuthConfig,
|
||||
@@ -351,6 +352,10 @@ pub fn same_format_provider_transport_unsupported_reason(
|
||||
family: SameFormatProviderFamily,
|
||||
api_format: &str,
|
||||
) -> Option<&'static str> {
|
||||
if is_grok_provider_transport(transport) && matches!(family, SameFormatProviderFamily::Standard)
|
||||
{
|
||||
return None;
|
||||
}
|
||||
if behavior.is_kiro {
|
||||
local_kiro_request_transport_unsupported_reason_with_network(transport)
|
||||
} else if behavior.is_antigravity {
|
||||
@@ -434,6 +439,10 @@ pub fn resolve_same_format_provider_direct_auth(
|
||||
transport: &GatewayProviderTransportSnapshot,
|
||||
family: SameFormatProviderFamily,
|
||||
) -> Option<(String, String)> {
|
||||
if is_grok_provider_transport(transport) && matches!(family, SameFormatProviderFamily::Standard)
|
||||
{
|
||||
return resolve_grok_session_auth(transport);
|
||||
}
|
||||
if behavior.is_vertex {
|
||||
None
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user