-
Notifications
You must be signed in to change notification settings - Fork 212
refactor: remove deprecated openai-error-handler shim and use error-handler #767
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 commits
ec3a89c
a11eba3
3e640c3
3951724
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -137,7 +137,7 @@ export class DeepSeekHandler extends OpenAiHandler { | |||||
| isAzureAiInference ? { path: OPENAI_AZURE_AI_INFERENCE_PATH } : {}, | ||||||
| ) | ||||||
| } catch (error) { | ||||||
| const { handleOpenAIError } = await import("./utils/openai-error-handler") | ||||||
| const { handleOpenAIError } = await import("./utils/error-handler") | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Every other provider uses a static import for
Suggested change
(And the catch body becomes just
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There wasn’t a specific reason to keep this as a dynamic import. |
||||||
| throw handleOpenAIError(error, "DeepSeek") | ||||||
| } | ||||||
|
|
||||||
|
|
||||||
This file was deleted.
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The test checks the message format, but
.statusis what the retry/backoff logic reads downstream — could we assert that it is preserved too?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I’ve updated the DeepSeek error test to capture the thrown error and assert both the wrapped message and the preserved status value.
This should cover the downstream retry/backoff logic that reads .status.