Add files via upload

fixing /v1/models:
- relabel model.id with model.name for OpenAI compliance
This commit is contained in:
Alpha Nerd 2025-09-02 14:44:21 +02:00 committed by GitHub
parent 7ed872379b
commit 9f32fcf75d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1161,6 +1161,9 @@ async def openai_models_proxy(request: Request):
models = {'data': []}
for modellist in all_models:
for model in modellist:
if not id in model.keys(): # Relable Ollama models with OpenAI Model.id from Model.name
model['id'] = model['name']
models['data'] += modellist
# 2. Return a JSONResponse with a deduplicated list of unique models for inference