anomalyco / anomalyco/opencode

[FEATURE]: Add LiteLLM as a provider

Open
#48,938 2 comments 3 reactions 1 assignee View on GitHub

@neriousy is already working on this.

Since Sep 14, 2026.

Dominant language
TypeScript
Stars
209k
Forks
27.5k
PR merge metrics
PR metrics pending

Description

Feature hasn't been suggested before.
  • I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request

Same as #22212 but opening a new issue as requested by GitHub Actions bot.

Users who run LiteLLM as a proxy for 100+ LLM providers can't point opencode at it. They have to configure each provider individually even when LiteLLM already provides a unified OpenAI-compatible endpoint.

It has the standard OpenAI discovery endpoint:

/v1/models

{
  "data": [
    {
      "id": "claude-fable-5-1",
      "object": "model",
      "created": 1677610602,
      "owned_by": "openai"
    },
    {
      "id": "deepseek-flash",
      "object": "model",
      "created": 1677610602,
      "owned_by": "openai",
      "mode": "chat",
      "max_input_tokens": 1000000,
      "max_output_tokens": 393216
    },
    ...
  ],
  "object": "list"
}

And the much more descriptive model info discovery endpoint:

/model/info

{
  "data": [
    {
      "model_name": "claude-fable-5-1",
      "litellm_params": {
        "litellm_credential_name": "anthropic",
        "allow_client_keepalive_override": false,
        "use_in_pass_through": false,
        "use_litellm_proxy": false,
        "use_xai_oauth": false,
        "merge_reasoning_content_in_choices": false,
        "model": "anthropic/claude-fable-5-1",
        "reasoning_effort": "high"
      },
      "model_info": {
        "id": "a4f4e83c4b403c4592f50403e15a97e90128048bcc1308301b1bb8118cf27906",
        "db_model": false,
        "access_via_team_ids": [],
        "direct_access": true,
        "key": "claude-fable-5-1",
        "max_tokens": 128000,
        "max_input_tokens": 1000000,
        "max_output_tokens": 128000,
        "input_cost_per_token": 0.00001,
        "input_cost_per_token_flex": null,
        "input_cost_per_token_priority": null,
        "input_cost_per_token_ultrafast": null,
        "cache_creation_input_token_cost": 0.0000125,
        "cache_creation_input_token_cost_above_200k_tokens": null,
        "cache_creation_input_token_cost_above_272k_tokens": null,
        "cache_creation_input_token_cost_above_272k_tokens_priority": null,
        "cache_creation_input_token_cost_above_272k_tokens_flex": null,
        "cache_creation_input_token_cost_flex": null,
        "cache_creation_input_token_cost_priority": null,
        "cache_creation_input_token_cost_ultrafast": null,
        "cache_read_input_token_cost": 2.5E-7,
        "prompt_cache_min_tokens": 512,
        "cache_read_input_token_cost_above_200k_tokens": null,
        "cache_read_input_token_cost_above_200k_tokens_priority": null,
        "cache_read_input_token_cost_above_272k_tokens": null,
        "cache_read_input_token_cost_above_272k_tokens_priority": null,
        "cache_read_input_token_cost_above_272k_tokens_flex": null,
        "cache_read_input_token_cost_above_512k_tokens": null,
        "cache_read_input_token_cost_flex": null,
        "cache_read_input_token_cost_priority": null,
        "cache_read_input_token_cost_ultrafast": null,
        "cache_creation_input_token_cost_above_1hr": 0.00002,
        "input_cost_per_character": null,
        "input_cost_per_token_above_128k_tokens": null,
        "input_cost_per_token_above_200k_tokens": null,
        "input_cost_per_token_above_200k_tokens_priority": null,
        "input_cost_per_token_above_272k_tokens": null,
        "input_cost_per_token_above_272k_tokens_priority": null,
        "input_cost_per_token_above_272k_tokens_flex": null,
        "input_cost_per_token_above_512k_tokens": null,
        "input_cost_per_query": null,
        "input_cost_per_second": null,
        "input_cost_per_audio_token": null,
        "input_cost_per_image_token": null,
        "input_cost_per_video_token": null,
        "input_cost_per_image": null,
        "input_cost_per_audio_per_second": null,
        "input_cost_per_video_per_second": null,
        "input_cost_per_token_batches": null,
        "output_cost_per_token_batches": null,
        "output_cost_per_token": 0.00005,
        "output_cost_per_token_flex": null,
        "output_cost_per_token_priority": null,
        "output_cost_per_token_ultrafast": null,
        "regional_processing_uplift_multiplier_eu": null,
        "regional_processing_uplift_multiplier_us": null,
        "regional_endpoint_uplift_multiplier": null,
        "output_cost_per_audio_token": null,
        "output_cost_per_character": null,
        "output_cost_per_reasoning_token": null,
        "output_cost_per_reasoning_token_flex": null,
        "output_cost_per_reasoning_token_priority": null,
        "output_cost_per_token_above_128k_tokens": null,
        "output_cost_per_character_above_128k_tokens": null,
        "output_cost_per_token_above_200k_tokens": null,
        "output_cost_per_token_above_200k_tokens_priority": null,
        "output_cost_per_token_above_272k_tokens": null,
        "output_cost_per_token_above_272k_tokens_priority": null,
        "output_cost_per_token_above_272k_tokens_flex": null,
        "output_cost_per_token_above_512k_tokens": null,
        "output_cost_per_second": null,
        "output_cost_per_second_1080p": null,
        "output_cost_per_video_per_second": null,
        "output_cost_per_image": null,
        "output_cost_per_image_token": null,
        "output_cost_per_video_token": null,
        "output_vector_size": null,
        "citation_cost_per_token": null,
        "tiered_pricing": null,
        "litellm_provider": "anthropic",
        "mode": "chat",
        "supports_system_messages": null,
        "supports_response_schema": true,
        "supports_vision": true,
        "supports_function_calling": true,
        "supports_tool_choice": true,
        "supports_assistant_prefill": false,
        "supports_prompt_caching": true,
        "supports_prompt_cache_breakpoint": null,
        "supports_audio_input": null,
        "supports_audio_output": null,
        "supports_pdf_input": true,
        "supports_embedding_image_input": null,
        "supports_native_streaming": null,
        "supports_native_structured_output": true,
        "supports_web_search": null,
        "supports_url_context": null,
        "supports_reasoning": true,
        "supports_adaptive_thinking": true,
        "thinking_always_on": true,
        "supports_tool_search": null,
        "supports_mid_conversation_system": true,
        "supports_none_reasoning_effort": null,
        "supports_minimal_reasoning_effort": null,
        "supports_low_reasoning_effort": null,
        "supports_xhigh_reasoning_effort": true,
        "supports_max_reasoning_effort": true,
        "bedrock_output_config_effort_ceiling": null,
        "bedrock_converse_supports_strict_tools": null,
        "supports_computer_use": true,
        "search_context_cost_per_query": {
          "search_context_size_high": 0.01,
          "search_context_size_low": 0.01,
          "search_context_size_medium": 0.01
        },
        "web_search_billing_unit": null,
        "tpm": null,
        "rpm": null,
        "ocr_cost_per_page": null,
        "ocr_cost_per_credit": null,
        "annotation_cost_per_page": null,
        "provider_specific_entry": {
          "us": 1.1
        },
        "uses_embed_content": null,
        "supports_image_size": null,
        "supported_openai_params": [
          "stream",
          "stop",
          "temperature",
          "top_p",
          "max_tokens",
          "max_completion_tokens",
          "tools",
          "tool_choice",
          "extra_headers",
          "parallel_tool_calls",
          "response_format",
          "user",
          "web_search_options",
          "speed",
          "context_management",
          "cache_control",
          "thinking",
          "reasoning_effort"
        ]
      }
    },
    {
      "model_name": "deepseek-flash",
      "litellm_params": {
        "litellm_credential_name": "deepseek",
        "allow_client_keepalive_override": false,
        "use_in_pass_through": false,
        "use_litellm_proxy": false,
        "use_xai_oauth": false,
        "merge_reasoning_content_in_choices": false,
        "model": "deepseek/deepseek-v4-flash-vision-exp",
        "reasoning_effort": "high"
      },
      "model_info": {
        "id": "780e0333cf29e85230de2724a95d2613ebb25617b44adaeddeeebe5a64ac35d2",
        "db_model": false,
        "access_via_team_ids": [],
        "direct_access": true,
        "key": "deepseek/deepseek-v4-flash-vision-exp",
        "max_tokens": 393216,
        "max_input_tokens": 1000000,
        "max_output_tokens": 393216,
        "input_cost_per_token": 4.4E-7,
        "input_cost_per_token_flex": null,
        "input_cost_per_token_priority": null,
        "input_cost_per_token_ultrafast": null,
        "cache_creation_input_token_cost": 0.0,
        "cache_creation_input_token_cost_above_200k_tokens": null,
        "cache_creation_input_token_cost_above_272k_tokens": null,
        "cache_creation_input_token_cost_above_272k_tokens_priority": null,
        "cache_creation_input_token_cost_above_272k_tokens_flex": null,
        "cache_creation_input_token_cost_flex": null,
        "cache_creation_input_token_cost_priority": null,
        "cache_creation_input_token_cost_ultrafast": null,
        "cache_read_input_token_cost": 1.4E-8,
        "prompt_cache_min_tokens": null,
        "cache_read_input_token_cost_above_200k_tokens": null,
        "cache_read_input_token_cost_above_200k_tokens_priority": null,
        "cache_read_input_token_cost_above_272k_tokens": null,
        "cache_read_input_token_cost_above_272k_tokens_priority": null,
        "cache_read_input_token_cost_above_272k_tokens_flex": null,
        "cache_read_input_token_cost_above_512k_tokens": null,
        "cache_read_input_token_cost_flex": null,
        "cache_read_input_token_cost_priority": null,
        "cache_read_input_token_cost_ultrafast": null,
        "cache_creation_input_token_cost_above_1hr": null,
        "input_cost_per_character": null,
        "input_cost_per_token_above_128k_tokens": null,
        "input_cost_per_token_above_200k_tokens": null,
        "input_cost_per_token_above_200k_tokens_priority": null,
        "input_cost_per_token_above_272k_tokens": null,
        "input_cost_per_token_above_272k_tokens_priority": null,
        "input_cost_per_token_above_272k_tokens_flex": null,
        "input_cost_per_token_above_512k_tokens": null,
        "input_cost_per_query": null,
        "input_cost_per_second": null,
        "input_cost_per_audio_token": null,
        "input_cost_per_image_token": null,
        "input_cost_per_video_token": null,
        "input_cost_per_image": null,
        "input_cost_per_audio_per_second": null,
        "input_cost_per_video_per_second": null,
        "input_cost_per_token_batches": null,
        "output_cost_per_token_batches": null,
        "output_cost_per_token": 0.00000132,
        "output_cost_per_token_flex": null,
        "output_cost_per_token_priority": null,
        "output_cost_per_token_ultrafast": null,
        "regional_processing_uplift_multiplier_eu": null,
        "regional_processing_uplift_multiplier_us": null,
        "regional_endpoint_uplift_multiplier": null,
        "output_cost_per_audio_token": null,
        "output_cost_per_character": null,
        "output_cost_per_reasoning_token": null,
        "output_cost_per_reasoning_token_flex": null,
        "output_cost_per_reasoning_token_priority": null,
        "output_cost_per_token_above_128k_tokens": null,
        "output_cost_per_character_above_128k_tokens": null,
        "output_cost_per_token_above_200k_tokens": null,
        "output_cost_per_token_above_200k_tokens_priority": null,
        "output_cost_per_token_above_272k_tokens": null,
        "output_cost_per_token_above_272k_tokens_priority": null,
        "output_cost_per_token_above_272k_tokens_flex": null,
        "output_cost_per_token_above_512k_tokens": null,
        "output_cost_per_second": null,
        "output_cost_per_second_1080p": null,
        "output_cost_per_video_per_second": null,
        "output_cost_per_image": null,
        "output_cost_per_image_token": null,
        "output_cost_per_video_token": null,
        "output_vector_size": null,
        "citation_cost_per_token": null,
        "tiered_pricing": null,
        "litellm_provider": "deepseek",
        "mode": "chat",
        "supports_system_messages": true,
        "supports_response_schema": true,
        "supports_vision": true,
        "supports_function_calling": true,
        "supports_tool_choice": true,
        "supports_assistant_prefill": true,
        "supports_prompt_caching": true,
        "supports_prompt_cache_breakpoint": null,
        "supports_audio_input": null,
        "supports_audio_output": null,
        "supports_pdf_input": null,
        "supports_embedding_image_input": null,
        "supports_native_streaming": true,
        "supports_native_structured_output": null,
        "supports_web_search": null,
        "supports_url_context": null,
        "supports_reasoning": true,
        "supports_adaptive_thinking": null,
        "thinking_always_on": null,
        "supports_tool_search": null,
        "supports_mid_conversation_system": null,
        "supports_none_reasoning_effort": null,
        "supports_minimal_reasoning_effort": null,
        "supports_low_reasoning_effort": null,
        "supports_xhigh_reasoning_effort": null,
        "supports_max_reasoning_effort": null,
        "bedrock_output_config_effort_ceiling": null,
        "bedrock_converse_supports_strict_tools": null,
        "supports_computer_use": null,
        "search_context_cost_per_query": null,
        "web_search_billing_unit": null,
        "tpm": null,
        "rpm": null,
        "ocr_cost_per_page": null,
        "ocr_cost_per_credit": null,
        "annotation_cost_per_page": null,
        "provider_specific_entry": null,
        "uses_embed_content": null,
        "supports_image_size": null,
        "supported_openai_params": [
          "frequency_penalty",
          "logit_bias",
          "logprobs",
          "top_logprobs",
          "max_tokens",
          "max_completion_tokens",
          "modalities",
          "prediction",
          "n",
          "presence_penalty",
          "seed",
          "stop",
          "stream",
          "stream_options",
          "temperature",
          "top_p",
          "tools",
          "tool_choice",
          "function_call",
          "functions",
          "max_retries",
          "extra_headers",
          "parallel_tool_calls",
          "audio",
          "web_search_options",
          "service_tier",
          "safety_identifier",
          "prompt_cache_key",
          "prompt_cache_retention",
          "store",
          "response_format",
          "thinking",
          "reasoning_effort"
        ]
      }
    },
    ...
  ]
}

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.