[model-gateway] refactor oai router 1/n (#14228)

This commit is contained in:
Simo Lin
2025-12-01 07:16:35 -08:00
committed by GitHub
parent 3de09aadbc
commit 79b389da6b
+13 -13
View File
@@ -1133,15 +1133,6 @@ impl crate::routers::RouterTrait for OpenAIRouter {
(StatusCode::NOT_IMPLEMENTED, "Embeddings not supported").into_response()
}
async fn route_rerank(
&self,
_headers: Option<&HeaderMap>,
_body: &RerankRequest,
_model_id: Option<&str>,
) -> Response {
(StatusCode::NOT_IMPLEMENTED, "Rerank not supported").into_response()
}
async fn route_classify(
&self,
_headers: Option<&HeaderMap>,
@@ -1151,6 +1142,15 @@ impl crate::routers::RouterTrait for OpenAIRouter {
(StatusCode::NOT_IMPLEMENTED, "Classify not supported").into_response()
}
async fn route_rerank(
&self,
_headers: Option<&HeaderMap>,
_body: &RerankRequest,
_model_id: Option<&str>,
) -> Response {
(StatusCode::NOT_IMPLEMENTED, "Rerank not supported").into_response()
}
async fn create_conversation(&self, _headers: Option<&HeaderMap>, body: &Value) -> Response {
create_conversation(&self.conversation_storage, body.clone()).await
}
@@ -1180,10 +1180,6 @@ impl crate::routers::RouterTrait for OpenAIRouter {
delete_conversation(&self.conversation_storage, conversation_id).await
}
fn router_type(&self) -> &'static str {
"openai"
}
async fn list_conversation_items(
&self,
_headers: Option<&HeaderMap>,
@@ -1258,4 +1254,8 @@ impl crate::routers::RouterTrait for OpenAIRouter {
)
.await
}
fn router_type(&self) -> &'static str {
"openai"
}
}