import { type Database } from "./database.js"; import { type ConnectionMetadataWithVerification } from "./connection-metadata.js"; import { type WorkspaceCustomModelProviderKind, type WorkspaceProviderCustomModel } from "./model-catalog.js"; import { type OrganizationModelProviderAuthMethod, type OrganizationModelProviderCustomModel, type OrganizationModelCatalogProviderKind } from "./organization-model-providers.js"; import { type OrganizationCompatibleEndpointForWorkspace } from "./organization-compatible-model-endpoints.js"; /** Attempt-local read results, never a cross-turn credential or authority cache. */ export type ModelProviderExecutionInputs = { claudeSubscriptionEnabled: boolean; loadOrganizationCredentials: boolean; workspaceModels: Record; organizationModels: Record; workspaceConnections: ConnectionMetadataWithVerification[]; encryptedCredentials: Partial>; /** Azure OpenAI's non-secret resource endpoint, beside its encrypted key. */ organizationEndpoints: Partial>; /** Azure OpenAI's sign-in method, when it is Microsoft Entra ID instead of a key. */ organizationAuthMethods: Partial>; /** * The organization's OpenAI-compatible endpoints this workspace can use, * with their models; each carries its encrypted key when credentials load. */ organizationCompatibleEndpoints: OrganizationCompatibleEndpointForWorkspace[]; /** * The organization's Anthropic API keys when its connection holds several * (encrypted, its own key first, without keys refused for lack of * credits); null for a single key, or when credentials don't load. */ organizationAnthropicApiKeys: { id: string; credentialEncrypted: string; }[] | null; /** Whether the workspace is EU-only (`isWorkspaceEuOnly`), read in the same transaction. */ euOnly: boolean; }; /** * Read the full execution catalog in one scoped transaction. Selected workspace * credentials still use the normal live broker and model-access check afterwards. * Keep organization model queries unchanged: their row order feeds the catalog. */ export declare function loadModelProviderExecutionInputs(db: Database, input: { accountId: string; workspaceId: string; claudeSubscriptionEnabled: boolean; loadOrganizationCredentials: boolean; }): Promise;