The factory behind the model listers of providers serving the OpenAI /models shape.
llm4s-core holds only the ProviderModelLister contract. This factory lived there too until it was found to read a vendor field - OpenAI's organization - straight off NamedProviderConfig; it moved here, with the OpenAI wire format, when that field became a provider-specific key (#1133). Its package is unchanged. A provider module that serves the same shape depends on llm4s-openai-compatible and calls openAICompatible; one that does not implements ProviderModelLister.
A lister for any provider serving the OpenAI-compatible /models endpoint.
A lister for any provider serving the OpenAI-compatible /models endpoint.
Every request carries Authorization: Bearer <apiKey> when the section has a key, then sectionHeaders(section), then extraHeaders, then the section's own headers; a later header of the same name wins.
Value parameters
apiKeyRequired
whether a section without an apiKey fails; false for endpoints, such as a local server, that take unauthenticated requests
defaultBaseUrl
base URL used when the section does not override it
extraHeaders
headers the provider requires on every request, e.g. OpenRouter's X-Title
modelsPath
path of the listing endpoint, relative to the base URL
provider
the ProviderId that owns the returned models; the config section must name it
sectionHeaders
headers derived from the section being listed - typically from a provider-specific key, as openAIOrganizationHeader sends OpenAI's organization. None by default.