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