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

This commit is contained in:
Anurag Saxena
2026-04-03 21:50:38 -04:00
committed by GitHub
parent 006c337de5
commit 38eabae2e7

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);