feat(backend): add claude runtime, anthropic OAuth auth kind, and profile→runtime derivation

This commit is contained in:
Gabriel Brown
2026-07-11 10:42:48 -04:00
parent 76886621b5
commit 70396feccc
5 changed files with 81 additions and 4 deletions
@@ -0,0 +1,41 @@
import { describe, expect, test } from 'vitest';
import { runtimesForProfile } from '../../convex/runtimeSupport';
describe('runtimesForProfile', () => {
test('anthropic + api_key drives claude and opencode', () => {
expect(
runtimesForProfile({ provider: 'anthropic', authType: 'api_key' }),
).toEqual(['claude', 'opencode']);
});
test('opencode_openai_login snapshot drives codex only', () => {
expect(
runtimesForProfile({
provider: 'opencode_openai_login',
authType: 'opencode_auth_json',
}),
).toEqual(['codex']);
});
test('anthropic + anthropic_oauth_json drives claude only', () => {
expect(
runtimesForProfile({
provider: 'anthropic',
authType: 'anthropic_oauth_json',
}),
).toEqual(['claude']);
});
test('openrouter + api_key drives opencode only', () => {
expect(
runtimesForProfile({ provider: 'openrouter', authType: 'api_key' }),
).toEqual(['opencode']);
});
test('openai + api_key drives opencode and codex', () => {
expect(
runtimesForProfile({ provider: 'openai', authType: 'api_key' }),
).toEqual(['opencode', 'codex']);
});
});