fix(ai): identify Responses error providers

closes #9298
This commit is contained in:
Vegard Stikbakke
2026-09-14 10:14:48 +02:00
parent 71dca871bc
commit 0c7bb7c5c7
2 changed files with 5 additions and 5 deletions
+1
View File
@@ -18,6 +18,7 @@
- Fixed the DeepSeek catalog to advertise `deepseek-flash` for DeepSeek V4.1 Flash instead of retired Flash aliases, and refreshed DeepSeek pricing metadata ([#9423](https://github.com/earendil-works/pi/issues/9423)).
- Removed GPT-5.4 and GPT-5.4 mini from the OpenAI Codex catalog after they became unavailable to ChatGPT accounts ([#9394](https://github.com/earendil-works/pi/issues/9394)).
- Fixed Mistral-hosted GLM-5.2 reasoning requests to use `reasoning_effort` instead of the ignored `prompt_mode` ([#9375](https://github.com/earendil-works/pi/issues/9375)).
- Fixed OpenAI-compatible Responses errors to identify the actual provider instead of always labeling them as OpenAI errors ([#9298](https://github.com/earendil-works/pi/issues/9298)).
## [0.85.1] - 2026-09-05
+4 -5
View File
@@ -98,10 +98,6 @@ function getPromptCacheOptions(
return undefined;
}
function formatOpenAIResponsesError(error: unknown): string {
return formatProviderError(normalizeProviderError(error), "OpenAI API error");
}
// OpenAI Responses-specific options
export interface OpenAIResponsesOptions extends StreamOptions {
reasoningEffort?: "minimal" | "low" | "medium" | "high" | "xhigh" | "max";
@@ -199,7 +195,10 @@ export const stream: StreamFunction<"openai-responses", OpenAIResponsesOptions>
delete (block as { customInput?: unknown }).customInput;
}
output.stopReason = options?.signal?.aborted ? "aborted" : "error";
output.errorMessage = formatOpenAIResponsesError(error);
output.errorMessage = formatProviderError(
normalizeProviderError(error),
`${model.provider === "openai" ? "OpenAI" : model.provider} API error`,
);
stream.push({ type: "error", reason: output.stopReason, error: output });
stream.end();
}