Skip to content

Azure AI Foundry/Kimi K2.5: "This model is not supported by the Responses API" #12949

Closed as not planned

Description

@gdl-reif

Description

We deployed Kimi K2.5 to Azure AI Foundry, set the environment variables according to the docs and connected with the API key thru the TUI. Every request to the Kimi K2.5 model fails though with the error message.

Image

Plugins

none

OpenCode version

1.1.53

Steps to reproduce

  1. Deploy Kimi K2.5 to Azure AI foundry
  2. Set up AZURE_COGNITIVE_SERVICES_RESOURCE_NAME as described in the docs
  3. Set up opencode.json:
{
    "$schema": "https://opencode.ai/config.json",
    "autoupdate": true,
    "provider": {
        "azure-cognitive-services": {
            "options": {
                "apiKey": "<redacted>",
                "resourceName": "<redacted>"
            },
            "models": {
                "Kimi-K2.5": {
                    "name": "Kimi-K2.5-az"
                }
            }
        }
    }
}
  1. auth opencode via opencode auth login oder /connect
  2. Select the model and send any message

Screenshot and/or share link

No response

Operating System

Windows 11

Terminal

Windows Terminal

Activity

  1. github-actions commented on Feb 10, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

  2. kunzaatko commented on Feb 19, 2026

    @kunzaatko

    I think that this may be that the Foundry Base Models use a different endpoint from the standard models. I got my Kimi-K2.5 to respond to the text (with quota exceeded I must admit) with setting the endpoint manually.
    Here is the respective part of my config:

        "provider": {
            "azure-foundry-base-models": {
                "name": "Azure Foundry Base Models",
                "npm": "@ai-sdk/openai-compatible",
                "options": {
                    "baseURL": "https://swedencentral.api.cognitive.microsoft.com/openai/v1"
                },
                "models": {
                    "Kimi-K2.5": {
                        "name": "Kimi-K2.5"
                    }
                }
            }
        },

    You can find the endpoint on the page of the model deployment in the code example.

    I cannot say however, why I have the quota exceeded issue, since I when using curl I get the answer just fine:

    $  curl -s "https://swedencentral.api.cognitive.microsoft.com/openai/v1/chat/completions" \                                                                                                                                                                           
             -H "Authorization: Bearer $AZURE_API_KEY" \
             -H "Content-Type: application/json" \
             -d '{"model": "Kimi-K2.5", "messages": [{"role": "user", "content": "Tell me hi!"}]}'
    {"choices":[{"content_filter_results":{"hate":{"filtered":false,"severity":"safe"},"protected_material_code":{"filtered":false,"detected":false},"protected_material_text":{"filtered":false,"detected":false},"self_harm":{"filtered":false,"severity":"safe"},"sexual":{"filtered":false,"severity":"safe"},"violence":{"filtered":false,"severity":"safe"}},"finish_reason":"stop","index":0,"logprobs":null,"message":{"content":"Hi! 👋 How can I help you today?","reasoning_content":"The user is asking me to say \"hi\" to them. This is a very simple request. I should respond in a friendly and welcoming manner.\n\nSince this is just a greeting and there's no complex task or potential harm involved, I can simply respond with a greeting.\n\nI'll say \"Hi!\" or something similar like \"Hello!\" or \"Hi there!\" to keep it friendly and appropriate. ","role":"assistant","tool_calls":null},"stop_reason":null}],"created":1771541816,"id":"0c26a35da4c140b3b5107072eb893ee0","model":"Kimi-K2.5","object":"chat.completion","prompt_filter_results":[{"prompt_index":0,"content_filter_results":{"hate":{"filtered":false,"severity":"safe"},"jailbreak":{"filtered":false,"detected":false},"self_harm":{"filtered":false,"severity":"safe"},"sexual":{"filtered":false,"severity":"safe"},"violence":{"filtered":false,"severity":"safe"}}}],"usage":{"audio_prompt_tokens":0,"completion_tokens":91,"prompt_tokens":12,"prompt_tokens_details":null,"reasoning_tokens":0,"total_tokens":103}}

    Can anyone comment on that?
    Is this method working for you?

  3. gdl-reif commented on Feb 20, 2026

    @gdl-reif
    Author

    Can confirm that this fixes the responses API error, the endpoint URL from the playground code sample seems to work. However, I get the same quota error that you reported while the chat playground doesn't bring up any quota errors.

  4. kunzaatko commented on Feb 20, 2026

    @kunzaatko

    @gdl-reif and do you have any ideas on what that can be caused by? You have sufficient quota? It does seem as a Azure issue, right?

  5. gdl-reif commented on Feb 20, 2026

    @gdl-reif
    Author

    @kunzaatko frankly speaking - no idea. The code samples and playground in Azure work as expected within our assigned quotas, but I get the quota error using the same model deployment when using it with OpenCode. From my tests, it looks more like a bug in OpenCode as the model can be used from the sample code.

  6. kunzaatko commented on Feb 20, 2026

    @kunzaatko

    To me as well since the curl works just fine. Good to know that it is not an individual issue and misconfiguration. That gives some direction at least

  7. OpeOginni commented on Feb 21, 2026

    @OpeOginni
    Contributor

    @gdl-reif @kunzaatko to fix that error you need to reduce the output for that model like so.

            "kimi-k2.5": {
              "id": "Kimi-K2.5",
              "limit": {
                "output": 10000, // Reduce limit.output for models where you get rate-limit errors
                "context": 262144
              }
            }
  8. OpeOginni commented on Feb 21, 2026

    @OpeOginni
    Contributor

    You can play around with the one they accept

  9. gdl-reif commented on Feb 23, 2026

    @gdl-reif
    Author

    @OpeOginni thanks - the rate limit is not (yet) the issue in OpenCode, currently the model is completely unsuable due to the error mentioned in the title "This model is not supported by the Responses API"

  10. OpeOginni commented on Feb 23, 2026

    @OpeOginni
    Contributor

    @gdl-reif got a fix for that, you would need to move None openAI models off the azure provider, and login to the azure cognition services using opencode auth login and make use of this config

        "azure-cognitive-services": {
          "npm": "@ai-sdk/openai-compatible", 
          "options": {
            "baseURL": "https://{resource_name}.openai.azure.com/openai/v1",
            "useCompletionUrls": true
          },
          "models": {
            "kimi-k2.5": {
              "id": "Kimi-K2.5",
              "limit": { "output": 10000, "context": 262144 }
            }
          }
        }
  11. gdl-reif commented on Feb 23, 2026

    @gdl-reif
    Author

    @OpeOginni can confirm that this configuration works with my Azure Foundry deployment of Kimi-K2.5 in the West Germany region - I did some quick (!) tests and did neither run into the Responses API error nor into a resource limit/rate limit.

  12. OpeOginni commented on Feb 23, 2026

    @OpeOginni
    Contributor

    Nice to hear @gdl-reif hopefully the team approves the PR that adds the better explanation to the docs

  13. kunzaatko commented on Feb 24, 2026

    @kunzaatko

    @gdl-reif @kunzaatko to fix that error you need to reduce the output for that model like so.

        "kimi-k2.5": {
          "id": "Kimi-K2.5",
          "limit": {
            "output": 10000, // Reduce limit.output for models where you get rate-limit errors
            "context": 262144
          }
        }
    

    I can confirm that this works on my machine... Thank you!

  14. kunzaatko commented on Feb 24, 2026

    @kunzaatko

    What I still do not understand though is the baseURL that I need to pass. You are using the Azure models with the "https://{resource_name}.openai.azure.com/openai/v1" endpoint? When I open the Foundry page it shows the target URI as https://swedencentral.api.cognitive.microsoft.com/models/chat/completions?api-version=2024-05-01-preview, which does not translate to the template with the resource_name that is the default. What is the problem there? Is that for the older version of Azure provider? Here is a screenshot from the Foundry portal:

    Image
  15. gdl-reif commented on Feb 24, 2026

    @gdl-reif
    Author

    You can find the correct URL in the playground sample code:

    Image
  16. kunzaatko commented on Feb 24, 2026

    @kunzaatko

    @gdl-reif And you are using the old or the new Foundry portal? I have only this:

    Image

    The endpoint that I provided works, but I have to configure the endpoint directly using the "@ai-sdk/openai-compatible" and "baseURL" so I was wondering, whether I could plug into the default Azure opencode provider configuration only when using the new Foundry portal...

  17. OpeOginni commented on Feb 24, 2026

    @OpeOginni
    Contributor

    @gdl-reif And you are using the old or the new Foundry portal? I have only this:

    Image

    The endpoint that I provided works, but I have to configure the endpoint directly using the "@ai-sdk/openai-compatible" and "baseURL" so I was wondering, whether I could plug into the default Azure opencode provider configuration only when using the new Foundry portal...

    That azure provider only wild with open ai models, hence why it's best to make a separate provider you can put in all your non OpenAI models that are OpenAI compatible like Kimi

  18. gdl-reif commented on Feb 24, 2026

    @gdl-reif
    Author

    @gdl-reif And you are using the old or the new Foundry portal? I have only this:

    I'm on the new "experience", but I remember the playground being there in the old version as well.

  19. kunzaatko commented on Feb 24, 2026

    @kunzaatko

    For anyone who ends up here and doesn't understand why the endpoint "https://{resource_name}.openai.azure.com/openai/v1" is not available to them, the custom_subdomain_name property of the foundry resource must be set up either in the portal or using terraform https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/cognitive_account.

  20. github-actions commented on Apr 26, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingwindows

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions