Skip to content

fix(model): make certain OpenAI API compatible model fields correctly optional#3508

Open
imrehg wants to merge 1 commit into
tailcallhq:mainfrom
imrehg:imrehg/openai-compatible-models
Open

fix(model): make certain OpenAI API compatible model fields correctly optional#3508
imrehg wants to merge 1 commit into
tailcallhq:mainfrom
imrehg:imrehg/openai-compatible-models

Conversation

@imrehg

@imrehg imrehg commented Jun 14, 2026

Copy link
Copy Markdown

Some fields previously required by this code are not actually present in the "OpenAI Compatible" model listing responses of either LlamaCpp, or the LmStudio providers.

Checking the actual OpenAI API specs, these fields are not required, and thus should be marked optional.

Reviewed:
https://developers.openai.com/api/reference/resources/models/methods/list and
https://github.com/openai/openai-openapi/blob/5162af98d3147432c14680df789e8e12d4891e6b/openapi.yaml

With these changes both of those providers' models could be listed (checked manually).

Closes #3507

@CLAassistant

CLAassistant commented Jun 14, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@github-actions github-actions Bot added the type: fix Iterations on existing features or infrastructure. label Jun 14, 2026
… optional

Some fields previously required by this code are not actually present
in the "OpenAI Compatible" model listing responses of either LlamaCpp,
or the LmStudio providers.

Checking the actual OpenAI API specs, these fields are not required,
and thus should be marked optional.

Reviewed:
https://developers.openai.com/api/reference/resources/models/methods/list
and
https://github.com/openai/openai-openapi/blob/5162af98d3147432c14680df789e8e12d4891e6b/openapi.yaml

With these changes both of those providers' models could be listed
(checked manually).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@imrehg imrehg force-pushed the imrehg/openai-compatible-models branch from 3da9f35 to 5a5aa98 Compare June 19, 2026 03:42
@imrehg

imrehg commented Jun 19, 2026

Copy link
Copy Markdown
Author

Rebased on the current main, to keep up. Any feedback is welcome!

NB: there are other issues to actually use the models (the templates handling), but this PR is a necessary first step to be able to load/list the models themselves.

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

Labels

type: fix Iterations on existing features or infrastructure.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: LlamaCpp and LmStudio login fails to get models

2 participants