feat(providers): model-registry routing + Responses API support and streaming fallbacks for OpenAI/Gemini
This commit is contained in:
@@ -28,6 +28,13 @@ pub trait Provider: Send + Sync {
|
||||
/// Process a chat completion request
|
||||
async fn chat_completion(&self, request: UnifiedRequest) -> Result<ProviderResponse, AppError>;
|
||||
|
||||
/// Process a chat request using provider-specific "responses" style endpoint
|
||||
/// Default implementation falls back to `chat_completion` for providers
|
||||
/// that do not implement a dedicated responses endpoint.
|
||||
async fn chat_responses(&self, request: UnifiedRequest) -> Result<ProviderResponse, AppError> {
|
||||
self.chat_completion(request).await
|
||||
}
|
||||
|
||||
/// Process a streaming chat completion request
|
||||
async fn chat_completion_stream(
|
||||
&self,
|
||||
|
||||
Reference in New Issue
Block a user