Skip to content

Commit 6ed9084

Browse files
committed
Fix agent loop to correctly handle non-OpenAI providers (e.g., Gemini)
1 parent 4b61fb8 commit 6ed9084

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

codex-cli/src/utils/agent/agent-loop.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -691,8 +691,8 @@ export class AgentLoop {
691691
.join("\n");
692692

693693
const responseCall =
694-
!this.config.provider ||
695-
this.config.provider?.toLowerCase() === "openai"
694+
(!this.provider || this.provider.toLowerCase() === "openai") &&
695+
(!this.config.provider || this.config.provider?.toLowerCase() === "openai")
696696
? (params: ResponseCreateParams) =>
697697
this.oai.responses.create(params)
698698
: (params: ResponseCreateParams) =>

0 commit comments

Comments
 (0)