chore: bump coding-agent to 0.7.14 - fix Anthropic OAuth and Mistral API compatibility
This commit is contained in:
@@ -226,6 +226,14 @@ export function getApiKeyForModel(model: Model<Api>): string | undefined {
|
||||
return resolveApiKey(customKeyConfig);
|
||||
}
|
||||
|
||||
// For Anthropic, check ANTHROPIC_OAUTH_KEY first
|
||||
if (model.provider === "anthropic") {
|
||||
const oauthKey = process.env.ANTHROPIC_OAUTH_TOKEN;
|
||||
if (oauthKey) {
|
||||
return oauthKey;
|
||||
}
|
||||
}
|
||||
|
||||
// For built-in providers, use getApiKey from @mariozechner/pi-ai
|
||||
return getApiKey(model.provider as KnownProvider);
|
||||
}
|
||||
|
||||
@@ -56,7 +56,8 @@ export class AssistantMessageComponent extends Container {
|
||||
this.contentContainer.addChild(new Text(chalk.red("\nAborted"), 1, 0));
|
||||
} else if (message.stopReason === "error") {
|
||||
const errorMsg = message.errorMessage || "Unknown error";
|
||||
this.contentContainer.addChild(new Text(chalk.red(`Error: ${errorMsg}`)));
|
||||
this.contentContainer.addChild(new Spacer(1));
|
||||
this.contentContainer.addChild(new Text(chalk.red(`Error: ${errorMsg}`), 1, 0));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user