OptionalapiOptionalapiEnvironment variables consulted for the key, in order.
OptionalbaseOrigin, with or without /v1 (https://api.groq.com/openai/v1, http://localhost:1234).
Optionaldefaultmax_tokens when the request sets none. Default: omit (provider default).
OptionaldefaultUsed when the request names no model and discovery found none.
OptionalfetchCustom fetch (proxy agent, tracing, tests).
OptionalheadersSent on every request, after the provider's own headers.
OptionalidProvider id used in routing and errors (openai, groq, ...).
OptionalmodelHow long (ms) a successful model listing is reused before discoverModels() fetches again. Default 300000; 0 disables.
OptionalmodelKeep only these ids from GET /models. Default: keep all.
OptionalmodelsSeed the supported-model list so no discovery call is needed.
OptionalnameDisplay name.
OptionalpresetA shipped host (groq, openrouter, ...): fills id, name, baseURL, apiKeyEnv and requireApiKey.
OptionalrequireRefuse requests without an API key (cloud APIs). Default false.
OptionalstreamDefault idle timeout (ms) for this provider's streams.
OptionalstreamSend stream_options: { include_usage: true } on streams. Default true.
OptionaltimeoutDefault whole-request timeout (ms) for this provider's JSON calls.
Options every built-in provider accepts.