export type ModelsProvider = "codex" | "supergrok" | "vercel" | "openrouter" | "opper" | "openai" | "azure_openai" | "anthropic" | "claude_subscription"; export type ModelsView = "connect" | "connect-workspace" | `connect:${ModelsProvider}` | `connect-org:${ModelsProvider}` | "allowed-models" | "compaction" | "account-rule-locks" | "model-access"; export declare function parseModelsView(value: unknown): ModelsView | undefined; export declare function parseModelsAccount(value: unknown): string | undefined; export type GatewayId = "vercel" | "openrouter" | "opper" | "anthropic" | "claude_subscription" /** Organization only; workspace pages never address these. */ | "openai" | "azure_openai"; /** The API-key providers a workspace can hold as its own. */ export type WorkspaceGatewayId = Exclude; export type AccountKey = ({ provider: "codex" | "supergrok" | "claude"; id: string; } | { provider: "gateway"; id: GatewayId; }) & { /** An organization account ("Everyone in "), not this workspace's own. */ organization: boolean; }; export declare function accountKeyOf(value: string | undefined): AccountKey | null; /** The account key for a row: `codex:`, or `org:codex:` for an organization account. */ export declare function accountKey(provider: "codex" | "supergrok" | "claude" | "gateway", id: string, organization?: boolean): string; /** The provider a connect step is for, and whether it connects for the organization. */ export declare function connectStepOf(view: ModelsView | undefined): { provider: ModelsProvider; organization: boolean; } | null; /** * A workspace's Settings > Models URL now opens that workspace's page in * Organization settings > Models, keeping the account or form it pointed at. */ export declare function workspaceModelsRedirect(input: { workspaceId: string; account: string | undefined; view: ModelsView | undefined; }): { section: "models"; workspace: string; account?: string | undefined; view?: ModelsView | undefined; }; /** * Organization > Models without `?workspace=` is the organization's own page. * Links saved from the old organization Models page named its accounts and * connect steps without the "org:" mark; read them as the organization's. * Every link into a workspace's page carries `workspace`, so nothing is lost. */ export declare function organizationModelsSearch(input: { workspace: string | undefined; account: string | undefined; view: ModelsView | undefined; }): { account: string | undefined; view: ModelsView | undefined; };