mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-02-04 21:23:07 +00:00
fix: correct model check for Codex API key validation
- Updated the model check logic to only consider "gpt-" prefixed models, removing the previous check for unsupported models. - Adjusted error message for authentication failures to provide clearer guidance on resolving API key issues.
This commit is contained in:
@@ -1092,7 +1092,7 @@ When done, summarize what you implemented and any notes for the developer.`;
|
|||||||
if (block.text && (block.text.includes("Invalid API key") ||
|
if (block.text && (block.text.includes("Invalid API key") ||
|
||||||
block.text.includes("authentication_failed") ||
|
block.text.includes("authentication_failed") ||
|
||||||
block.text.includes("Fix external API key"))) {
|
block.text.includes("Fix external API key"))) {
|
||||||
const isCodex = finalModel.startsWith("gpt-") || finalModel.startsWith("o");
|
const isCodex = finalModel.startsWith("gpt-")
|
||||||
const errorMsg = isCodex
|
const errorMsg = isCodex
|
||||||
? "Authentication failed: Invalid or expired API key. " +
|
? "Authentication failed: Invalid or expired API key. " +
|
||||||
"Please check your OPENAI_API_KEY or run 'codex login' to re-authenticate."
|
"Please check your OPENAI_API_KEY or run 'codex login' to re-authenticate."
|
||||||
|
|||||||
Reference in New Issue
Block a user