-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Description
Currently, the base URLs for each provider (e.g., OpenAI, xAI, Meta, Groq, etc.) are either hardcoded in constructors or available as internal constants, but there is no standard, programmatic way to retrieve all supported provider base URLs from the public API. This makes it hard to build tools or integrations that need to display, validate, or customize base URLs per provider.
Request:
- Provide a documented, public way to retrieve the default base URL for each provider, ideally via a utility or exported map/object in the main entrypoint.
- Optionally, expose a method or static property on each provider class or through the provider registry that returns the default base URL.
- Ensure this works for all built-in providers (OpenAI, Anthropic, TogetherAI, Groq, Mistral, Meta, xAI, etc.).
Rationale:
- Consistent API ergonomics when configuring or displaying current endpoints
- Easier programmatic inspection, validation, and dynamic provider selection
- Less need to deep import or duplicate the constants externally
Example API:
import { PROVIDER_BASE_URLS, getProviderBaseURL } from 'multi-llm-ts/providers';
console.log(PROVIDER_BASE_URLS["openai"]); // "https://api.openai.com/v1"
console.log(getProviderBaseURL("groq")); // "https://api.groq.com"If there is technical or compatibility complexity, documenting a recommended way to obtain these URLs from the package would also help.
Thanks!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels