Skip to content

feat(azure): add modelId for capability checks and telemetry - #23463

Open
n1ckoates wants to merge 2 commits into
mainfrom
nick/azure-model-id
Open

n1ckoates wants to merge 2 commits into
mainfrom
nick/azure-model-id

Conversation

@n1ckoates

@n1ckoates n1ckoates commented Oct 16, 2026 •

Copy link
Copy Markdown
Member

Background

The Azure provider currently takes in azure(deploymentId) but treats deploymentId as the model ID for both capability checks and telemetry reporting.

Deployment IDs often don't identify the model though (e.g. could just be `production) which causes model capabilities to be incorrectly checked and telemetry to show the deployment id as the model id.

Summary

Added a { modelId } settings object as an optional second parameter to azure() (and azure.chat, azure.responses, etc).

azure('production', { modelId: 'gpt-5.6' });

The Azure provider uses @ai-sdk/openai for its implementation, so I had to add a requestModelId option there, which defaults to the existing model ID. When both are present, the OpenAI provider:

  • Uses modelId for capability checks, telemetry
  • Only uses requestModelId to send the actual request

End-to-End Verification

Ran the new example against an Azure deployment whose name didn't match its modelId.

Checklist

  • All commits are signed (PRs with unsigned commits cannot be merged)
  • Tests have been added / updated (for bug fixes / features)
  • Documentation has been added / updated (for bug fixes / features)
  • A patch changeset for relevant packages has been added (for bug fixes / features - run pnpm changeset in the project root)
  • I have reviewed this pull request (self-review)

Related Issues

@n1ckoates n1ckoates changed the title feat(azure): add modelId param for capability checks and telemetry feat(azure): add modelId for capability checks and telemetry Oct 16, 2026
@n1ckoates
n1ckoates marked this pull request as ready for review October 16, 2026 22:44

This branch was successfully deployed

1 active deployment
Preview — 602e60aa Deployed Oct 16, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature: Add optional modelName param to Azure .languageModel() for accurate telemetry (e.g., fix Langfuse cost calculation)

1 participant