Skip to content

fix(azure-cognitive-services): correct env var in kimi model API URLs#2654

Merged
rekram1-node merged 2 commits into
anomalyco:devfrom
RISHIKREDDYL:fix/azure-cognitive-services-env-var
Jun 18, 2026
Merged

fix(azure-cognitive-services): correct env var in kimi model API URLs#2654
rekram1-node merged 2 commits into
anomalyco:devfrom
RISHIKREDDYL:fix/azure-cognitive-services-env-var

Conversation

@RISHIKREDDYL

Copy link
Copy Markdown
Contributor

Problem

The kimi-k2.5.toml and kimi-k2.6.toml model files in Azure Cognitive Services use ${AZURE_RESOURCE_NAME} in their API URLs, but the provider declares AZURE_COGNITIVE_SERVICES_RESOURCE_NAME as the expected environment variable in providers/azure-cognitive-services/provider.toml.

At runtime, the provider would fail because AZURE_RESOURCE_NAME is not one of its declared environment variables.

Changes

providers/azure-cognitive-services/models/kimi-k2.6.toml

  • Replaced AZURE_RESOURCE_NAME with AZURE_COGNITIVE_SERVICES_RESOURCE_NAME in the API URL

providers/azure-cognitive-services/models/kimi-k2.5.toml

  • Converted from a symlink pointing to ../../azure/models/kimi-k2.5.toml into a standalone real file
  • Uses the corrected env var AZURE_COGNITIVE_SERVICES_RESOURCE_NAME

Why not keep the symlink?

Models that override the default @ai-sdk/azure provider with a different npm module (Claude models with @ai-sdk/anthropic, kimi models with @ai-sdk/openai-compatible) must be real files in each provider directory because their API URLs reference different environment variables per provider. This matches the existing pattern used by all Claude models in azure-cognitive-services/models/.

Verification

  • The Azure versions (in providers/azure/models/) are untouched and continue using AZURE_RESOURCE_NAME
  • The Cognitive Services versions now correctly reference AZURE_COGNITIVE_SERVICES_RESOURCE_NAME
  • The symlink was the only symlink with a [provider] block pointing to the Azure directory

RISHIKREDDYL and others added 2 commits June 17, 2026 23:30
The kimi-k2.5.toml and kimi-k2.6.toml files in azure-cognitive-services used
AZURE_RESOURCE_NAME in their API URLs, but the provider declares
AZURE_COGNITIVE_SERVICES_RESOURCE_NAME as the expected environment variable.

Changes:
- kimi-k2.5.toml: converted from symlink (pointing to azure/models/) to
  standalone real file with the corrected env var
- kimi-k2.6.toml: replaced AZURE_RESOURCE_NAME with
  AZURE_COGNITIVE_SERVICES_RESOURCE_NAME in the API URL

This matches the pattern used by other models with provider overrides in
azure-cognitive-services (e.g. claude-haiku-4-5, claude-opus-4-1, etc.).
@rekram1-node rekram1-node merged commit 684b1f3 into anomalyco:dev Jun 18, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants