mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-17 01:04:36 +00:00
chore: bump coding-agent to 0.7.14 - fix Anthropic OAuth and Mistral API compatibility
This commit is contained in:
parent
a5ed6ab641
commit
063b7e0f11
9 changed files with 303 additions and 7 deletions
|
|
@ -2,6 +2,15 @@
|
|||
|
||||
## [Unreleased]
|
||||
|
||||
## [0.7.14] - 2025-11-17
|
||||
|
||||
### Fixed
|
||||
|
||||
- **Anthropic OAuth Support**: Added support for `ANTHROPIC_OAUTH_TOKEN` environment variable. The agent now checks for OAuth tokens before falling back to API keys for Anthropic models, enabling OAuth-based authentication.
|
||||
- **Mistral API Compatibility**: Fixed compatibility with Mistral API by excluding the `store` field and using `max_tokens` instead of `max_completion_tokens`, and avoiding the `developer` role in system prompts.
|
||||
- **Error Display**: Fixed error message display in assistant messages to include proper spacing before the error text.
|
||||
- **Message Streaming**: Fixed missing `message_start` event when no partial message chunks were received during streaming.
|
||||
|
||||
## [0.7.13] - 2025-11-16
|
||||
|
||||
### Fixed
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@mariozechner/pi-coding-agent",
|
||||
"version": "0.7.13",
|
||||
"version": "0.7.14",
|
||||
"description": "Coding agent CLI with read, bash, edit, write tools and session management",
|
||||
"type": "module",
|
||||
"bin": {
|
||||
|
|
|
|||
|
|
@ -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));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue