Skip to content
Merged
Show file tree
Hide file tree
Changes from 8 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
5 changes: 5 additions & 0 deletions src/codex/paths.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ export const CODEX_PROFILE_PATH = join(CODEX_HOME, "opencodex.config.toml");
export const DEFAULT_CATALOG_PATH = join(CODEX_HOME, "opencodex-catalog.json");
export const CODEX_MODELS_CACHE_PATH = join(CODEX_HOME, "models_cache.json");

/** Runtime CODEX_HOME lookup (honors CODEX_HOME env changes after import). */
export function getCodexHome(): string {
return resolveCodexHome();
}

export function tomlString(value: string): string {
return JSON.stringify(value);
}
Expand Down
2 changes: 1 addition & 1 deletion src/codex/routing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ function getEligiblePoolAccounts(config: OcxConfig, excludeId?: string, now = Da
return ids;
}

function getPoolAccountPlan(config: OcxConfig, accountId: string): string | undefined {
export function getPoolAccountPlan(config: OcxConfig, accountId: string): string | undefined {
if (accountId === MAIN_CODEX_ACCOUNT_ID) return getMainAccountPlan();
return (config.codexAccounts ?? []).find(account => !account.isMain && account.id === accountId)?.plan;
}
Expand Down
Loading
Loading