fix: retry /responses endpoint when GitHub returns model not supported (closes #470) (#488)

This commit is contained in:
Anurag Saxena
2026-04-04 08:50:38 +07:00
committed by GitHub
parent 006c337de5
commit 38eabae2e7
+1 -1
View File
@@ -124,7 +124,7 @@ export class GithubExecutor extends BaseExecutor {
if (result.response.status === HTTP_STATUS.BAD_REQUEST) {
const errorBody = await result.response.clone().text();
if (errorBody.includes("not accessible via the /chat/completions endpoint")) {
if (errorBody.includes("not accessible via the /chat/completions endpoint") || errorBody.includes("The requested model is not supported")) {
log?.warn("GITHUB", `Model ${model} requires /responses. Switching...`);
this.knownCodexModels.add(model);
return this.executeWithResponsesEndpoint(options);