Skip to content

feat(azure): added azure anthropic, added backwards compat support for chat completions API, added opus 4.6 - #3145

Merged
icecrasher321 merged 5 commits into
stagingfrom
fix/completions
Feb 5, 2026
Merged

feat(azure): added azure anthropic, added backwards compat support for chat completions API, added opus 4.6#3145
icecrasher321 merged 5 commits into
stagingfrom
fix/completions

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Summary

  • added azure anthropic, added backwards compat support for chat completions API, added opus 4.6

Type of Change

  • New feature

Testing

Tested manually

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel

vercelBot commented Feb 5, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
ProjectDeploymentActionsUpdated (UTC)
docsSkippedSkippedFeb 5, 2026 6:49pm

Request Review

@greptile-apps

Copy link
Copy Markdown
Contributor

Greptile Overview

Greptile Summary

This PR adds three major features:

1. Azure Anthropic Provider

  • Adds new azure-anthropic provider that enables Claude models via Azure AI Foundry
  • Extracts shared Anthropic logic into anthropic/core.ts for code reuse between standard and Azure providers
  • Azure provider properly configures baseURL ({endpoint}/anthropic) and headers (api-key, anthropic-version)
  • Includes 5 Azure Anthropic models: Claude Opus 4.6, Opus 4.5, Opus 4.1, Sonnet 4.5, and Haiku 4.5

2. Claude Opus 4.6 with Adaptive Thinking

  • Adds Claude Opus 4.6 model definition with support for "max" thinking level (4 levels: low, medium, high, max)
  • Implements adaptive thinking for Opus 4.6 using thinking: {type: 'adaptive'} + output_config: {effort} pattern
  • Maintains backwards compatibility with budget-based extended thinking for older models (Opus 4.5, 4.1, 4.0, Sonnet, Haiku)
  • Updates agent block UI to support max thinking level

3. Azure OpenAI Chat Completions Backwards Compatibility

  • Adds URL parsing utilities to detect and handle full chat completions endpoint URLs
  • Extracts deployment name, api-version, and base URL from full endpoint strings
  • Enables users to pass complete Azure URLs instead of just base endpoints
  • Falls back gracefully to existing Responses API behavior when no chat completions pattern detected

Confidence Score: 5/5

  • This PR is safe to merge with no critical issues identified
  • Well-structured implementation with proper separation of concerns. The shared core logic pattern is clean and maintainable. All type definitions are properly updated. The adaptive thinking implementation correctly distinguishes between Opus 4.6 and older models. Backwards compatibility additions are non-breaking and gracefully fallback.
  • No files require special attention

Important Files Changed

FilenameOverview
apps/sim/providers/anthropic/core.tsNew shared core implementation for Anthropic providers with thinking capability support (Opus 4.6 adaptive thinking + budget-based extended thinking)
apps/sim/providers/azure-anthropic/index.tsNew Azure Anthropic provider using shared core implementation with Azure-specific client configuration
apps/sim/providers/models.tsAdded Claude Opus 4.6 model definition, Azure Anthropic provider models, and max thinking level support
apps/sim/providers/azure-openai/index.tsAdded backwards compatibility for chat completions API endpoint format
apps/sim/providers/azure-openai/utils.tsAdded utility functions for parsing chat completions endpoint URLs (extracting base URL, deployment, api-version)

Sequence Diagram

sequenceDiagram
participant Client
participant ProviderRegistry
participant AzureAnthropicProvider
participant AnthropicProvider
participant CoreImplementation
participant AnthropicSDK
participant AzureEndpoint
Note over Client,AzureEndpoint: Azure Anthropic Provider Flow (New)
Client->>ProviderRegistry: executeRequest(model: azure-anthropic/claude-opus-4-6)
ProviderRegistry->>AzureAnthropicProvider: executeRequest()
AzureAnthropicProvider->>AzureAnthropicProvider: Validate azureEndpoint & apiKey
AzureAnthropicProvider->>AzureAnthropicProvider: Strip azure-anthropic/ prefix from model
AzureAnthropicProvider->>AzureAnthropicProvider: Construct baseURL: {endpoint}/anthropic
AzureAnthropicProvider->>CoreImplementation: executeAnthropicProviderRequest(request, config)
Note over CoreImplementation: Shared Core Logic
CoreImplementation->>CoreImplementation: Check thinkingLevel capability
alt Opus 4.6 (adaptive thinking)
CoreImplementation->>CoreImplementation: Set thinking: {type: 'adaptive'}, output_config: {effort}
else Other models (extended thinking)
CoreImplementation->>CoreImplementation: Set thinking: {type: 'enabled', budget_tokens}
end
CoreImplementation->>AnthropicSDK: Create client with Azure baseURL + headers
CoreImplementation->>AzureEndpoint: POST /anthropic/v1/messages
AzureEndpoint-->>CoreImplementation: Response with tool calls
alt Tools present
CoreImplementation->>CoreImplementation: Execute tools
CoreImplementation->>AzureEndpoint: Continue conversation with tool results
end
AzureEndpoint-->>CoreImplementation: Final response
CoreImplementation-->>AzureAnthropicProvider: ProviderResponse
AzureAnthropicProvider-->>ProviderRegistry: ProviderResponse
ProviderRegistry-->>Client: Result
Note over Client,AnthropicSDK: Standard Anthropic Provider Flow (Refactored)
Client->>ProviderRegistry: executeRequest(model: claude-opus-4-6)
ProviderRegistry->>AnthropicProvider: executeRequest()
AnthropicProvider->>CoreImplementation: executeAnthropicProviderRequest(request, config)
CoreImplementation->>AnthropicSDK: Create client with standard config
CoreImplementation->>AnthropicSDK: POST /v1/messages
AnthropicSDK-->>CoreImplementation: Response
CoreImplementation-->>Client: Result
Note over Client,AzureEndpoint: Azure OpenAI Backwards Compatibility (Enhanced)
Client->>ProviderRegistry: executeRequest(endpoint: chat/completions URL)
ProviderRegistry->>AzureAnthropicProvider: executeRequest()
AzureAnthropicProvider->>AzureAnthropicProvider: Detect chat completions endpoint
AzureAnthropicProvider->>AzureAnthropicProvider: Extract baseURL, deployment, api-version
AzureAnthropicProvider->>AzureEndpoint: Use chat completions API
AzureEndpoint-->>Client: Response
Loading

@greptile-appsgreptile-appsBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

5 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

@waleedlatif1

Copy link
Copy Markdown
CollaboratorAuthor

@cursor review

Comment threadapps/sim/blocks/blocks/agent.ts
Comment threadapps/sim/providers/azure-openai/index.ts
@waleedlatif1

Copy link
Copy Markdown
CollaboratorAuthor

@cursor review

@cursorcursorBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 3 potential issues.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

Comment threadapps/sim/providers/azure-openai/index.ts
Comment threadapps/sim/providers/azure-openai/index.ts
Comment threadapps/sim/providers/azure-anthropic/index.ts
@icecrasher321
icecrasher321 merged commit 1d4d61a into stagingFeb 5, 2026
3 checks passed
@waleedlatif1
waleedlatif1 deleted the fix/completions branch February 5, 2026 18:52
royceP2 pushed a commit to arenadeveloper02/p2-sim that referenced this pull request Mar 3, 2026
…r chat completions API, added opus 4.6 (simstudioai#3145)
* feat(azure): added azure anthropic, added backwards compat support for chat completions API, added opus 4.6
* added max thinking level
* update tests
* ack comments
* update cql validation
Sign up for freeto 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

@waleedlatif1@icecrasher321