Bug
Using any non-OpenAI model under the azure provider (e.g. azure/claude-opus-4-6) crashes with:
TypeError: sdk.responses is not a function. (In 'sdk.responses(modelID)', 'sdk.responses' is undefined)
Root Cause
Azure Claude models in the models.dev catalog use npm: "@ai-sdk/anthropic" with endpoint https://${AZURE_RESOURCE_NAME}.services.ai.azure.com/anthropic/v1. The azure and azure-cognitive-services custom loaders unconditionally call sdk.responses(modelID), which only exists on @ai-sdk/azure and @ai-sdk/openai SDKs.
When the SDK is @ai-sdk/anthropic (has .chat() but no .responses()) or @ai-sdk/openai-compatible (has only .languageModel()), the call crashes.
Affected Models
Any Azure model with a model-level provider.npm override that isn't @ai-sdk/azure:
azure/claude-opus-4-6 → @ai-sdk/anthropic
azure/claude-opus-4-5 → @ai-sdk/anthropic
azure/claude-sonnet-4-5 → @ai-sdk/anthropic
azure/claude-haiku-4-5 → @ai-sdk/anthropic
azure/claude-opus-4-1 → @ai-sdk/anthropic
Fix
Guard sdk.responses with existence checks, falling back through sdk.chat → sdk.languageModel:
if (sdk.responses) return sdk.responses(modelID)
if (sdk.chat) return sdk.chat(modelID)
return sdk.languageModel(modelID)
Bug
Using any non-OpenAI model under the
azureprovider (e.g.azure/claude-opus-4-6) crashes with:Root Cause
Azure Claude models in the models.dev catalog use
npm: "@ai-sdk/anthropic"with endpointhttps://${AZURE_RESOURCE_NAME}.services.ai.azure.com/anthropic/v1. Theazureandazure-cognitive-servicescustom loaders unconditionally callsdk.responses(modelID), which only exists on@ai-sdk/azureand@ai-sdk/openaiSDKs.When the SDK is
@ai-sdk/anthropic(has.chat()but no.responses()) or@ai-sdk/openai-compatible(has only.languageModel()), the call crashes.Affected Models
Any Azure model with a model-level
provider.npmoverride that isn't@ai-sdk/azure:azure/claude-opus-4-6→@ai-sdk/anthropicazure/claude-opus-4-5→@ai-sdk/anthropicazure/claude-sonnet-4-5→@ai-sdk/anthropicazure/claude-haiku-4-5→@ai-sdk/anthropicazure/claude-opus-4-1→@ai-sdk/anthropicFix
Guard
sdk.responseswith existence checks, falling back throughsdk.chat→sdk.languageModel: