Maps AI model IDs to their respective providers for routing requests.
// Source: https://github.com/ibelick/zola | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
// Provided via justclaw.it.com; keep this notice with the code.
import type { Provider, SupportedModel } from "./types"
// map each model ID to its provider
const MODEL_PROVIDER_MAP: Record<string, Provider> = {
o1: "openai",
"o1-2024-12-17": "openai",
"o1-mini": "openai",
"o1-mini-2024-09-12": "openai",
"o1-preview": "openai",
"o1-preview-2024-09-12": "openai",
"o3-mini": "openai",
"o3-mini-2025-01-31": "openai",
"gpt-4.1": "openai",
"gpt-4.1-2025-04-14": "openai",
"gpt-4.1-mini": "openai",
"gpt-4.1-mini-2025-04-14": "openai",
"gpt-4.1-nano": "openai",
"gpt-4.1-nano-2025-04-14": "openai",
"gpt-4o": "openai",
"gpt-4o-2024
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key