Skip to content

feat(server): Add OpenAI /v1/models/{model_id} endpoint - #108

Open
phillipmunn wants to merge 1 commit into
FlashML-org:mainfrom
phillipmunn:open-ai-retrieve-model
Open

feat(server): Add OpenAI /v1/models/{model_id} endpoint#108
phillipmunn wants to merge 1 commit into
FlashML-org:mainfrom
phillipmunn:open-ai-retrieve-model

Conversation

@phillipmunn

@phillipmunn phillipmunn commented Aug 23, 2026

Copy link
Copy Markdown

In Microsoft Visual Studio, you can use local AI endpoints. When you point it at the OpenAI compatible API, it makes a request to:

GET http://127.0.0.1:1919/v1/models

and returns:


{
  "object": "list",
  "data": [
    {
      "id": "Qwen3.6-35B-A3B-NVFP4",
      ...
    }
  ]
}

Afterwards, Visual Studio then makes a follow up request to:

GET http://127.0.0.1:1919/v1/models/Qwen3.6-35B-A3B-NVFP4 and currently gets a 404, even though the model really is loaded. This then prevents FreeToken server from being used as Visual Studio assumes the OpenAPI server and/or model name is invalid.

This is a small OpenAI-compatibility gap. The OpenAI API has a “retrieve model” operation corresponding to GET /v1/models/{model}, and some clients evidently use it to validate a manually specified model name.

This change leaves the existing /v1/models endpoint unchanged and only adds the missing OpenAI-compatible retrieve-model operation. The existing route currently constructs its ModelCard using the same context-length and reasoning-effort metadata shown above.

@gdevenyi

Copy link
Copy Markdown

If we're going to expand the OpenAI endpoints, maybe we should audit for any other missing features too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants