improvement(providers): replace @ts-ignore with typed ProviderError class#3235
Merged
waleedlatif1 merged 1 commit intostagingfrom Feb 17, 2026
Merged
improvement(providers): replace @ts-ignore with typed ProviderError class#3235waleedlatif1 merged 1 commit intostagingfrom
waleedlatif1 merged 1 commit intostagingfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
Greptile SummaryReplaced all Key improvements:
Changes verified:
Confidence Score: 5/5
Important Files Changed
Class DiagramclassDiagram
class Error {
+string message
+string name
+string stack
}
class ProviderError {
+string message
+string name
+TimingInfo timing
+constructor(message, timing)
}
class TimingInfo {
+string startTime
+string endTime
+number duration
}
class FunctionCallResponse {
+string name
+Record arguments
+string startTime
+string endTime
+number duration
+Record result
+Record output
+Record input
+boolean success
}
Error <|-- ProviderError : extends
ProviderError *-- TimingInfo : contains
note for ProviderError "Replaces Error + @ts-ignore pattern\nProvides typed timing metadata"
note for FunctionCallResponse "Added success field\n(already returned by providers)"
Last reviewed commit: 2cc728f |
Contributor
Greptile SummaryReplaces 14 Key improvements:
Type safety enhancements:
Confidence Score: 5/5
Important Files Changed
Class DiagramclassDiagram
class ProviderError {
+string name
+string message
+timing timing
+constructor(message, timing)
}
class Error {
+string name
+string message
}
class FunctionCallResponse {
+string name
+Record arguments
+string startTime
+string endTime
+number duration
+Record result
+Record output
+Record input
+boolean success
}
class TimingInfo {
+string startTime
+string endTime
+number duration
}
ProviderError --|> Error : extends
ProviderError *-- TimingInfo : contains
note for ProviderError "Replaces @ts-ignore pattern with typed error"
note for FunctionCallResponse "success field now formally typed"
Last reviewed commit: 2cc728f |
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
ProviderErrorclass toproviders/types.tswith typedtimingproperty@ts-ignore+ dynamic property assignments across 12 provider filessuccessfield toFunctionCallResponse(already pushed by every provider)any[]casts with proper types (Message[],FunctionCallResponse[]) in xai, openrouter, vllm, bedrockvllmErrorType/vllmErrorCodedead code& { success: boolean }workaround in azure-openaifixes #3180
Type of Change
Testing
TypeScript compiles cleanly with
tsc --noEmit. No runtime changes.Checklist