import { parseCodexBaseURL } from "@dexto/core";
const LLM_PROVIDER_DISPLAY_NAMES = {
  openai: "OpenAI",
  "openai-compatible": "OpenAI-Compatible",
  anthropic: "Anthropic",
  google: "Google",
  groq: "Groq",
  xai: "xAI",
  cohere: "Cohere",
  minimax: "MiniMax",
  glm: "GLM",
  openrouter: "OpenRouter",
  litellm: "LiteLLM",
  glama: "Glama",
  vertex: "Vertex",
  bedrock: "Bedrock",
  local: "Local",
  ollama: "Ollama",
  "dexto-nova": "Dexto Nova"
};
function getLLMProviderDisplayName(provider, baseURL) {
  if (provider === "openai-compatible") {
    const codex = parseCodexBaseURL(baseURL);
    if (codex?.authMode === "chatgpt") {
      return "via ChatGPT";
    }
    if (codex) {
      return "via Codex";
    }
  }
  return LLM_PROVIDER_DISPLAY_NAMES[provider] ?? provider;
}
export {
  getLLMProviderDisplayName
};
