Skip to content

add models endpoint#13234

Open
rekram1-node wants to merge 4 commits intodevfrom
models-endpoint
Open

add models endpoint#13234
rekram1-node wants to merge 4 commits intodevfrom
models-endpoint

Conversation

@rekram1-node
Copy link
Collaborator

No description provided.

@manascb1344
Copy link

This PR is exactly what I need! I have a custom AI provider with 100+ models and new models are added daily. Manual configuration for every model is completely unsustainable.

@ghost91-
Copy link
Contributor

ghost91- commented Feb 16, 2026

@rekram1-node Thanks for working on this. What do you think about adding functionality for plugins to hook into the detection mechanism?

My use case is the following:

The /v1/models endpoint only provides limited information. In particular, there is no information about capabilities or context limits etc. So the configuration for autodetected models is quite limited, too, and thus not all functionality of OpenCode can be leveraged. For example, auto compaction and showing context usage would not work, just to name a few.

However, at my company’s LLM inference server, we have a separate custom endpoint that provides all the necessary information. So if there was a plugin API to hook into the auto detection mechanism, we could write a plugin that calls that endpoint instead of /v1/models.

I have actually already tried to do something similar, simply with the config hook. But the problem is: The endpoint is authenticated and when you use the regular authentication mechanism (auth.json), there is no easy way to get the api key for the provider in the config hook (short of reading the auth.json file manually). Dedicated functionality to hook into this behavior would help with that.

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.

4 participants