more changes

This commit is contained in:
Adil Hafeez 2025-09-17 18:11:37 -07:00
parent a3f93de85d
commit a73c8d1dc1
No known key found for this signature in database
GPG key ID: 9B18EF7691369645
3 changed files with 7 additions and 3 deletions

View file

@ -142,8 +142,9 @@ async fn main() -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
.with_context(parent_cx)
.await
}
(&Method::GET, "/v1/models") => Ok(list_models(llm_providers).await),
(&Method::OPTIONS, "/v1/models") => {
(&Method::GET, "/v1/models" | "/agents/v1/models") => Ok(list_models(llm_providers).await),
// hack for now to get openw-web-ui to work
(&Method::OPTIONS, "/v1/models" | "/agents/v1/models") => {
let mut response = Response::new(empty());
*response.status_mut() = StatusCode::NO_CONTENT;
response

View file

@ -7,7 +7,7 @@ services:
- "4317:4317"
- "4318:4318"
open-web-ui:
image: ghcr.io/open-webui/open-webui:main
image: dyrnq/open-webui:main
restart: always
ports:
- "8080:8080"

View file

@ -75,6 +75,9 @@ async def chat_completions(request_body: ChatCompletionRequest, request: Request
return StreamingResponse(
stream_chat_completions(request_body, traceparent_header),
media_type="text/plain",
headers={
"content-type": "text/event-stream",
},
)
else:
return await non_streaming_chat_completions(request_body, traceparent_header)