feat(models): updated model configs, updated anthropic provider to propagate errors back to user if any#3159
Merged
waleedlatif1 merged 9 commits intostagingfrom Feb 7, 2026
Merged
Conversation
…opagate errors back to user if any
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
Greptile OverviewGreptile SummaryUpdated model configurations and improved error handling across multiple AI providers. Key changes include: Model Configuration Updates
Anthropic Provider Improvements
OpenAI/Azure Provider Improvements
Other Provider Updates
Type Safety & Code Quality
Confidence Score: 4/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant User
participant AgentBlock
participant AgentHandler
participant ProviderRegistry
participant AnthropicProvider
participant OpenAIProvider
participant ModelConfig
User->>AgentBlock: Configure agent (model, thinkingLevel, reasoningEffort, etc)
AgentBlock->>AgentHandler: Execute with inputs
AgentHandler->>AgentHandler: Build provider request
Note over AgentHandler: Add thinkingLevel parameter
AgentHandler->>ProviderRegistry: Route request to provider
alt Anthropic Provider
ProviderRegistry->>AnthropicProvider: executeRequest()
AnthropicProvider->>ModelConfig: getMaxOutputTokensForModel()
ModelConfig-->>AnthropicProvider: maxTokens (simplified from object to number)
AnthropicProvider->>AnthropicProvider: Build thinking config (if thinkingLevel !== 'none')
Note over AnthropicProvider: Check compatibility:<br/>- Adjust max_tokens for budget_tokens<br/>- Set temperature=undefined<br/>- Limit tool_choice to 'auto'/'none'
AnthropicProvider->>AnthropicProvider: createMessage() helper
Note over AnthropicProvider: Auto-switch to streaming<br/>if max_tokens > 21333
AnthropicProvider->>AnthropicProvider: Preserve thinking blocks in tool loops
AnthropicProvider-->>AgentHandler: Response with enhanced error handling
else OpenAI/Azure Provider
ProviderRegistry->>OpenAIProvider: executeRequest()
OpenAIProvider->>OpenAIProvider: Skip 'auto' for reasoningEffort/verbosity
Note over OpenAIProvider: Prevent invalid API values
OpenAIProvider-->>AgentHandler: Response with improved typing
end
AgentHandler-->>User: Final response with tokens, cost, timing
|
Collaborator
Author
|
@greptile |
Collaborator
Author
|
@cursor review |
ac6420b to
d431c8d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Type of Change
Testing
Tested manually
Checklist