Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/pi/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Pi package for CortexKit Anthropic OAuth support. It overrides Pi's built-in `anthropic` provider with a CortexKit provider extension backed by the shared `@cortexkit/anthropic-auth-core` package.

The Pi provider catalog includes Claude Fable 5 (`claude-fable-5`), limited-access Claude Mythos 5 (`claude-mythos-5`), Claude Opus 4.8, Claude Opus 4.5, and Claude Sonnet 4.5. Fable/Mythos reasoning uses Anthropic adaptive thinking with `thinking.display: "summarized"` and `output_config.effort`; the package does not send rejected manual `thinking.budget_tokens` for those models.
The Pi provider catalog includes Claude Fable 5 (`claude-fable-5`), limited-access Claude Mythos 5 (`claude-mythos-5`), Claude Opus 4.8, Claude Opus 4.5, Claude Sonnet 4.5, and Claude Sonnet 5 (`claude-sonnet-5`). Fable/Mythos reasoning uses Anthropic adaptive thinking with `thinking.display: "summarized"` and `output_config.effort`; the package does not send rejected manual `thinking.budget_tokens` for those models.

This package is part of the CortexKit Anthropic Auth monorepo, which supports both OpenCode (`@cortexkit/opencode-anthropic-auth`) and Pi (`@cortexkit/pi-anthropic-auth`) through the same shared core logic.

Expand Down
9 changes: 9 additions & 0 deletions packages/pi/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,15 @@ export default function cortexKitPiAnthropicAuth(pi: ExtensionAPI) {
contextWindow: 200_000,
maxTokens: 64_000,
},
{
id: 'claude-sonnet-5',
name: 'Claude Sonnet 5',
reasoning: true,
input: textImageInput(),
cost: { input: 2, output: 10, cacheRead: 0.2, cacheWrite: 2.5 },
contextWindow: 1_000_000,
maxTokens: 128_000,
},
],
oauth: {
name: 'Anthropic Claude Pro/Max (CortexKit)',
Expand Down
47 changes: 47 additions & 0 deletions packages/pi/src/tests/index.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
import { describe, expect, test } from 'bun:test'
import type { ExtensionAPI } from '@earendil-works/pi-coding-agent'

import cortexKitPiAnthropicAuth from '../index'

function mockPi() {
const providers = new Map<
string,
{ models?: Array<Record<string, unknown>> }
>()

const pi = {
registerCommand: () => {},
registerProvider: (
name: string,
config: { models?: Array<Record<string, unknown>> },
) => {
providers.set(name, config)
},
} as unknown as ExtensionAPI

return { pi, providers }
}

describe('cortexKitPiAnthropicAuth provider registration', () => {
test('exposes Claude Sonnet 5 in the Pi Anthropic catalog', () => {
const { pi, providers } = mockPi()

cortexKitPiAnthropicAuth(pi)

const anthropic = providers.get('anthropic')
expect(anthropic).toBeDefined()

const sonnet5 = anthropic?.models?.find(
(model) => model.id === 'claude-sonnet-5',
)
expect(sonnet5).toMatchObject({
id: 'claude-sonnet-5',
name: 'Claude Sonnet 5',
reasoning: true,
input: ['text', 'image'],
cost: { input: 2, output: 10, cacheRead: 0.2, cacheWrite: 2.5 },
contextWindow: 1_000_000,
maxTokens: 128_000,
Comment thread
cubic-dev-ai[bot] marked this conversation as resolved.
})
Comment thread
greptile-apps[bot] marked this conversation as resolved.
})
})