mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-19 00:05:24 +00:00
Fix API key priority and compaction bugs
- getEnvApiKey: ANTHROPIC_OAUTH_TOKEN now takes precedence over ANTHROPIC_API_KEY - findCutPoint: Stop scan-backwards loop at session header (was decrementing past it causing null preparation) - generateSummary/generateTurnPrefixSummary: Throw on stopReason=error instead of returning empty string - Test files: Fix API key priority order, use keepRecentTokens=1 for small test conversations
This commit is contained in:
parent
c58d5f20a4
commit
251fea752c
7 changed files with 98 additions and 110 deletions
|
|
@ -16,7 +16,7 @@ import { SessionManager } from "../src/core/session-manager.js";
|
|||
import { SettingsManager } from "../src/core/settings-manager.js";
|
||||
import { codingTools } from "../src/core/tools/index.js";
|
||||
|
||||
const API_KEY = process.env.ANTHROPIC_API_KEY || process.env.ANTHROPIC_OAUTH_TOKEN;
|
||||
const API_KEY = process.env.ANTHROPIC_OAUTH_TOKEN || process.env.ANTHROPIC_API_KEY;
|
||||
|
||||
describe.skipIf(!API_KEY)("Compaction hooks", () => {
|
||||
let session: AgentSession;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue