% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/get_provider.R
\name{get_provider}
\alias{get_provider}
\title{Determine provider from model name}
\usage{
get_provider(model)
}
\arguments{
\item{model}{Character string specifying the model name (e.g., "gpt-5.5", "claude-opus-4-7").}
}
\value{
Character string of the provider name (e.g., "openai", "anthropic").
}
\description{
This function determines the appropriate provider (e.g., OpenAI, Anthropic, Google, OpenRouter) based on the model name.
Uses prefix-based matching for efficient and maintainable provider detection.
New models following existing naming conventions are automatically supported.
}
\details{
Supported providers and model prefixes:
\itemize{
\item OpenAI: gpt-\emph{, o1}, o3*, o4*, chatgpt-\emph{, codex-} (e.g., 'gpt-5.5', 'gpt-5.4-mini')
\item Anthropic: claude-* (e.g., 'claude-opus-4-7', 'claude-sonnet-4-6')
\item DeepSeek: deepseek-* (e.g., 'deepseek-v4-flash', 'deepseek-v4-pro')
\item Google: gemini-* (e.g., 'gemini-3.1-pro-preview', 'gemini-3-flash-preview')
\item Qwen: qwen*, qwq-* (e.g., 'qwen3.6-plus', 'qwen3.6-flash')
\item Stepfun: step-* (e.g., 'step-3.5-flash', 'step-3')
\item Zhipu: glm-\emph{, chatglm} (e.g., 'glm-5.1', 'glm-5-turbo')
\item MiniMax: minimax-* (e.g., 'MiniMax-M2.7', 'MiniMax-M2.5')
\item Grok: grok-* (e.g., 'grok-4.3', 'grok-4.3-latest')
\item Kimi (Moonshot AI Open Platform): kimi-\emph{, moonshot-} (e.g., 'kimi-k2.6', 'moonshot-v1-8k')
\item OpenRouter: Any model with '/' in the name (e.g., 'openai/gpt-5.5', 'anthropic/claude-opus-4.7')
}
}
