refactor(providers): move oauth/ to providers/oauth/ and simplify model names
- Move src/agent/oauth/ to src/agent/providers/oauth/ (parent-child structure) - Delete deprecated oauth/providers.ts re-export file - Simplify Claude model names: claude-opus-4-5 (without date suffix) - Update Codex models to current lineup (gpt-5.2, gpt-5.1-codex, etc.) - Set claude-opus-4-5 as default model for claude-code provider Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
1592e0c211
commit
932ecb5dbb
6 changed files with 15 additions and 30 deletions
|
|
@ -1,2 +0,0 @@
|
|||
export * from "./cli-credentials.js";
|
||||
export * from "./providers.js";
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
/**
|
||||
* @deprecated This file is deprecated. Import from '../providers/index.js' instead.
|
||||
*
|
||||
* This file re-exports from the new providers/ module for backwards compatibility.
|
||||
* Will be removed in a future version.
|
||||
*/
|
||||
|
||||
export {
|
||||
type AuthMethod,
|
||||
type ProviderInfo,
|
||||
type ProviderConfig,
|
||||
isOAuthProvider,
|
||||
isProviderAvailable,
|
||||
getCurrentProvider,
|
||||
getProviderList,
|
||||
getAvailableProviders,
|
||||
formatProviderStatus,
|
||||
getLoginInstructions,
|
||||
resolveProviderConfig,
|
||||
} from "../providers/index.js";
|
||||
7
src/agent/providers/oauth/index.ts
Normal file
7
src/agent/providers/oauth/index.ts
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
/**
|
||||
* OAuth Credential Reading
|
||||
*
|
||||
* Read OAuth credentials from external CLI tools (Claude Code, Codex).
|
||||
*/
|
||||
|
||||
export * from "./cli-credentials.js";
|
||||
|
|
@ -9,7 +9,7 @@ import { credentialManager } from "../credentials.js";
|
|||
import {
|
||||
hasValidClaudeCliCredentials,
|
||||
hasValidCodexCliCredentials,
|
||||
} from "../oauth/cli-credentials.js";
|
||||
} from "./oauth/cli-credentials.js";
|
||||
|
||||
// ============================================================
|
||||
// Types
|
||||
|
|
@ -50,24 +50,24 @@ const PROVIDER_REGISTRY: Record<string, ProviderMeta> = {
|
|||
id: "claude-code",
|
||||
name: "Claude Code (OAuth)",
|
||||
authMethod: "oauth",
|
||||
defaultModel: "claude-sonnet-4-20250514",
|
||||
models: ["claude-sonnet-4-20250514", "claude-opus-4-20250514"],
|
||||
defaultModel: "claude-opus-4-5",
|
||||
models: ["claude-opus-4-5", "claude-sonnet-4-5", "claude-haiku-4-5"],
|
||||
loginCommand: "claude login",
|
||||
},
|
||||
"openai-codex": {
|
||||
id: "openai-codex",
|
||||
name: "Codex (OAuth)",
|
||||
authMethod: "oauth",
|
||||
defaultModel: "gpt-5.1",
|
||||
models: ["gpt-5.1", "gpt-5.1-codex-max"],
|
||||
defaultModel: "gpt-5.2",
|
||||
models: ["gpt-5.2", "gpt-5.2-codex", "gpt-5.1-codex", "gpt-5.1-codex-mini", "gpt-5.1-codex-max"],
|
||||
loginCommand: "codex login",
|
||||
},
|
||||
"anthropic": {
|
||||
id: "anthropic",
|
||||
name: "Anthropic (API Key)",
|
||||
authMethod: "api-key",
|
||||
defaultModel: "claude-sonnet-4-20250514",
|
||||
models: ["claude-sonnet-4-20250514", "claude-opus-4-20250514", "claude-haiku-3-5-20241022"],
|
||||
defaultModel: "claude-sonnet-4-5",
|
||||
models: ["claude-opus-4-5", "claude-sonnet-4-5", "claude-haiku-4-5"],
|
||||
loginUrl: "https://console.anthropic.com/",
|
||||
},
|
||||
"openai": {
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ import { credentialManager } from "../credentials.js";
|
|||
import {
|
||||
readClaudeCliCredentials,
|
||||
readCodexCliCredentials,
|
||||
} from "../oauth/cli-credentials.js";
|
||||
} from "./oauth/cli-credentials.js";
|
||||
import {
|
||||
PROVIDER_ALIAS,
|
||||
getProviderMeta,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue