Documentation
¶
Overview ¶
Package modelsgateway discovers the models served by an OpenAI-compatible models gateway by querying its /v1/models endpoint.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ListModels ¶
ListModels queries <gatewayURL>/v1/models and returns the IDs of the models the gateway serves. Query parameters present in gatewayURL are forwarded. When the gateway targets a trusted Docker domain, the Docker Desktop token is required and sent as a Bearer token, mirroring how provider clients authenticate gateway traffic.
An error is returned when the gateway is unreachable, responds with a non-200 status (e.g. it doesn't implement /v1/models), or returns a body that isn't a valid OpenAI-style model list. Callers are expected to fall back to their non-discovery behavior in that case.
Types ¶
This section is empty.