"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
  for (var name in all)
    __defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
  if (from && typeof from === "object" || typeof from === "function") {
    for (let key of __getOwnPropNames(from))
      if (!__hasOwnProp.call(to, key) && key !== except)
        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
  }
  return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var llm_provider_display_exports = {};
__export(llm_provider_display_exports, {
  getLLMProviderDisplayName: () => getLLMProviderDisplayName
});
module.exports = __toCommonJS(llm_provider_display_exports);
var import_core = require("@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 = (0, import_core.parseCodexBaseURL)(baseURL);
    if (codex?.authMode === "chatgpt") {
      return "via ChatGPT";
    }
    if (codex) {
      return "via Codex";
    }
  }
  return LLM_PROVIDER_DISPLAY_NAMES[provider] ?? provider;
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
  getLLMProviderDisplayName
});
