Skip to content

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

Open
imrehg wants to merge 2 commits 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 2 commits 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.

@github-actions

Copy link
Copy Markdown

Action required: PR inactive for 5 days.
Status update or closure in 10 days.

@github-actions github-actions Bot added the state: inactive No current action needed/possible; issue fixed, out of scope, or superseded. label Jun 24, 2026
@imrehg

imrehg commented Jun 24, 2026

Copy link
Copy Markdown
Author

Heyhey, anything I can do here, to move this change forward (or let me know if this is not desirable for you). I'm using this local patch to be able to run llama.cpp and/or LM Studio as backend with local models.

@github-actions github-actions Bot removed the state: inactive No current action needed/possible; issue fixed, out of scope, or superseded. label Jun 24, 2026
@jezek

jezek commented Jun 26, 2026

Copy link
Copy Markdown

hello...

i've experienced the same problem, as described in #3507, with llama.cpp server after an update some time ago...
i've forked and localy built this PR and i want to report, that this PR works as intended and lets me use local models trough llama.cpp-server again...

thank you @imrehg

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

3 participants