feat(server): Add OpenAI /v1/models/{model_id} endpoint - #108
Open
phillipmunn wants to merge 1 commit into
Open
Conversation
|
If we're going to expand the OpenAI endpoints, maybe we should audit for any other missing features too |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
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.