# Supported model providers for Agent Zero
# ---------------------------------------
#
# Each provider type ("chat", "embedding") contains a mapping of provider IDs
# to their configurations.
#
# The provider ID (e.g., "anthropic") is used:
#  - in the settings UI dropdowns.
#  - to construct the environment variable for the API key (e.g., ANTHROPIC_API_KEY).
#
# Each provider configuration requires:
#   name:             Human-readable name for the UI.
#   litellm_provider: The corresponding provider name in LiteLLM.
#
# Optional fields:
#   kwargs:           A dictionary of extra parameters to pass to LiteLLM.
#                     This is useful for `api_base`, `extra_headers`, non-secret local placeholders, etc.
#
# Optional model listing fields (used by the Model Configuration plugin):
#   models_list:
#     endpoint_url:   URL or path for the model listing API.
#                     Absolute URL (https://...) is used directly.
#                     Relative path (/path) is appended to api_base or default_base.
#     format:         Response parsing format: "openai" (default), "google", "ollama".
#     params:         Extra query parameters for the listing request.
#     default_base:   Default base URL for local/self-hosted providers.

chat:
  a0_venice:
    name: Agent Zero API
    litellm_provider: openai
    models_list:
      endpoint_url: "https://api.venice.ai/api/v1/models"
    kwargs:
      a0_api_mode: chat
      api_base: https://llm.agent-zero.ai/v1
      venice_parameters:
        include_venice_system_prompt: false
  anthropic:
    name: Anthropic
    litellm_provider: anthropic
    models_list:
      endpoint_url: "https://api.anthropic.com/v1/models"
      params:
        limit: "1000"
    kwargs:
      a0_api_mode: chat
  cerebras:
    name: Cerebras
    litellm_provider: cerebras
    models_list:
      endpoint_url: "/models"
    kwargs:
      a0_api_mode: chat
      api_base: https://api.cerebras.ai/v1
  cometapi:
    name: CometAPI
    litellm_provider: cometapi
    models_list:
      endpoint_url: "https://api.cometapi.com/v1/models"
    kwargs:
      a0_api_mode: chat
  deepseek:
    name: DeepSeek
    litellm_provider: deepseek
    models_list:
      endpoint_url: "https://api.deepseek.com/models"
    kwargs:
      a0_api_mode: chat
  github_copilot:
    name: GitHub Copilot
    litellm_provider: github_copilot
    kwargs:
      extra_headers:
        "Editor-Version": "vscode/1.85.1"
        "Copilot-Integration-Id": "vscode-chat"
        "Copilot-Vision-Request": "true"
  google:
    name: Google
    litellm_provider: gemini
    models_list:
      endpoint_url: "/v1beta/models"
      format: "google"
      params:
        pageSize: "1000"
      default_base: "https://generativelanguage.googleapis.com"
    kwargs:
      a0_api_mode: chat
  groq:
    name: Groq
    litellm_provider: groq
    models_list:
      endpoint_url: "https://api.groq.com/openai/v1/models"
    kwargs:
      a0_api_mode: chat
  huggingface:
    name: HuggingFace
    litellm_provider: huggingface
    kwargs:
      a0_api_mode: chat
  lm_studio:
    name: LM Studio
    litellm_provider: lm_studio
    models_list:
      endpoint_url: "/v1/models"
      default_base: "http://host.docker.internal:1234"
    kwargs:
      a0_api_mode: chat
      api_base: "http://host.docker.internal:1234/v1"
      api_key: "lm-studio"
  llama_cpp:
    name: llama.cpp
    litellm_provider: hosted_vllm
    models_list:
      endpoint_url: "/v1/models"
      default_base: "http://host.docker.internal:8080"
    kwargs:
      a0_api_mode: chat
      api_base: "http://host.docker.internal:8080/v1"
      api_key: "llama-cpp"
  mistral:
    name: Mistral AI
    litellm_provider: mistral
    models_list:
      endpoint_url: "https://api.mistral.ai/v1/models"
    kwargs:
      a0_api_mode: chat
  moonshot:
    name: Moonshot AI
    litellm_provider: moonshot
    models_list:
      endpoint_url: "https://api.moonshot.cn/v1/models"
    kwargs:
      a0_api_mode: chat
  nebius:
    name: Nebius Token Factory
    litellm_provider: openai
    models_list:
      endpoint_url: "/models"
    kwargs:
      a0_api_mode: chat
      api_base: https://api.tokenfactory.nebius.com/v1
  nvidia_nim:
    name: NVIDIA NIM
    litellm_provider: nvidia_nim
    models_list:
      endpoint_url: "https://integrate.api.nvidia.com/v1/models"
    kwargs:
      a0_api_mode: chat
  ollama:
    name: Ollama
    litellm_provider: ollama
    models_list:
      endpoint_url: "/api/tags"
      format: "ollama"
      default_base: "http://host.docker.internal:11434"
    kwargs:
      a0_api_mode: chat
      api_base: "http://host.docker.internal:11434"
  omlx:
    name: oMLX
    litellm_provider: hosted_vllm
    models_list:
      endpoint_url: "/v1/models"
      default_base: "http://host.docker.internal:8000"
    kwargs:
      a0_api_mode: chat
      api_base: "http://host.docker.internal:8000/v1"
      api_key: "omlx"
  ollama_cloud:
    name: Ollama Cloud
    litellm_provider: openai
    models_list:
      endpoint_url: "/models"
    kwargs:
      a0_api_mode: chat
      api_base: https://ollama.com/v1
  openai:
    name: OpenAI
    litellm_provider: openai
    models_list:
      endpoint_url: "https://api.openai.com/v1/models"
  azure:
    name: OpenAI Azure
    litellm_provider: azure
    models_list:
      endpoint_url: "/openai/models"
      params:
        api-version: "2024-10-21"
  bedrock:
    name: AWS Bedrock
    litellm_provider: bedrock
    kwargs:
      a0_api_mode: chat
  openrouter:
    name: OpenRouter
    litellm_provider: openrouter
    models_list:
      endpoint_url: "https://openrouter.ai/api/v1/models"
    kwargs:
      a0_api_mode: chat
      extra_headers:
        "HTTP-Referer": "https://agent-zero.ai/"
        "X-Title": "Agent Zero"
        "X-OpenRouter-Categories": "personal-agent,cloud-agent"
  sambanova:
    name: Sambanova
    litellm_provider: sambanova
    models_list:
      endpoint_url: "https://api.sambanova.ai/v1/models"
    kwargs:
      a0_api_mode: chat
  venice:
    name: Venice.ai
    litellm_provider: openai
    models_list:
      endpoint_url: "https://api.venice.ai/api/v1/models"
    kwargs:
      a0_api_mode: chat
      api_base: https://api.venice.ai/api/v1
      venice_parameters:
        include_venice_system_prompt: false
  vllm:
    name: vLLM
    litellm_provider: hosted_vllm
    models_list:
      endpoint_url: "/v1/models"
      default_base: "http://host.docker.internal:8000"
    kwargs:
      a0_api_mode: chat
      api_base: "http://host.docker.internal:8000/v1"
      api_key: "vllm"
  xai:
    name: xAI
    litellm_provider: xai
    models_list:
      endpoint_url: "https://api.x.ai/v1/models"
    kwargs:
      a0_api_mode: chat
  zai:
    name: Z.AI
    litellm_provider: openai
    models_list:
      endpoint_url: "/models"
    kwargs:
      a0_api_mode: chat
      api_base: https://api.z.ai/api/paas/v4
  zai_coding:
    name: Z.AI Coding
    litellm_provider: openai
    models_list:
      endpoint_url: "/models"
    kwargs:
      a0_api_mode: chat
      api_base: https://api.z.ai/api/coding/paas/v4
  other:
    name: Other OpenAI compatible
    litellm_provider: openai
    kwargs:
      a0_api_mode: chat

embedding:
  huggingface:
    name: HuggingFace
    litellm_provider: huggingface
  google:
    name: Google
    litellm_provider: gemini
  lm_studio:
    name: LM Studio
    litellm_provider: lm_studio
    kwargs:
      api_base: "http://host.docker.internal:1234/v1"
      api_key: "lm-studio"
  llama_cpp:
    name: llama.cpp
    litellm_provider: hosted_vllm
    kwargs:
      api_base: "http://host.docker.internal:8080/v1"
      api_key: "llama-cpp"
  mistral:
    name: Mistral AI
    litellm_provider: mistral
  nvidia_nim:
    name: NVIDIA NIM
    litellm_provider: nvidia_nim
    models_list:
      endpoint_url: "https://integrate.api.nvidia.com/v1/models"
  ollama:
    name: Ollama
    litellm_provider: ollama
    kwargs:
      api_base: "http://host.docker.internal:11434"
  omlx:
    name: oMLX
    litellm_provider: hosted_vllm
    kwargs:
      api_base: "http://host.docker.internal:8000/v1"
      api_key: "omlx"
  openai:
    name: OpenAI
    litellm_provider: openai
  azure:
    name: OpenAI Azure
    litellm_provider: azure
  bedrock:
    name: AWS Bedrock
    litellm_provider: bedrock
  # TODO: OpenRouter not yet supported by LiteLLM, replace with native litellm_provider openrouter and remove api_base when ready
  openrouter:
    name: OpenRouter
    litellm_provider: openai
    kwargs:
      api_base: https://openrouter.ai/api/v1
      extra_headers:
        "HTTP-Referer": "https://agent-zero.ai/"
        "X-Title": "Agent Zero"
        "X-OpenRouter-Categories": "personal-agent,cloud-agent"
  a0_venice:
    name: Agent Zero API
    litellm_provider: openai
    models_list:
      endpoint_url: "https://api.venice.ai/api/v1/models"
    kwargs:
      api_base: https://llm.agent-zero.ai/v1
  venice:
    name: Venice.ai
    litellm_provider: openai
    models_list:
      endpoint_url: "https://api.venice.ai/api/v1/models"
    kwargs:
      api_base: https://api.venice.ai/api/v1
  vllm:
    name: vLLM
    litellm_provider: hosted_vllm
    kwargs:
      api_base: "http://host.docker.internal:8000/v1"
      api_key: "vllm"
  other:
    name: Other OpenAI compatible
    litellm_provider: openai
