UNPKG

openclaw

Version:

Multi-channel AI gateway with extensible messaging integrations

118 lines • 5.81 kB
import { B as ModelCompatConfig, H as ModelMediaInputConfig, J as ModelApi, ar as ModelCatalogStatus, nr as ModelCatalogContextWindowOption, ur as ModelInferenceCapabilities } from "./types-D3g9JHH2.js"; import { T as ThinkingLevelMap } from "./types-D_RlIixM.js"; import { t as CyberAccessProgram } from "./sessions-row-56zOIHhu.js"; //#region src/plugins/provider-catalog-outcome.d.ts type ProviderCatalogOutcome = { provider: string; /** Auth profile tested by discovery; omission means provider-wide auth. */ profileId?: string; /** Limits an auth rejection to catalog discovery rather than model execution. */ rejectionScope?: "catalog"; status: "ready" | "auth-rejected" | "unavailable"; /** Accepted selections advertised by this authenticated account, never static model support. */ modelAccessPrograms?: readonly { modelId: string; runtimeId: string; /** Physical route for host-owned credentials; native observations stay harness-scoped. */ api?: string; baseUrl?: string; cyber: readonly CyberAccessProgram[]; }[]; /** Private account-scoped observations from successful discovery, never static model hints. */ modelServiceTiers?: readonly { modelId: string; runtimeId: string; api: string; baseUrl: string; serviceTiers: readonly string[]; }[]; /** Optional successful discovery order for models already present in the catalog. */ modelOrder?: readonly string[]; /** * Private provenance: every model id a successful account listing returned, including hidden * rows; never projected publicly. Subscription routes for other ids are not entitled. */ listedModelIds?: readonly string[]; /** Private successful server listing for config advisories, independent of entitlement. */ modelIdCatalog?: { baseUrl: string; modelIds: readonly string[]; /** Provider-owned matching data, such as variant aliases omitted from picker rows. */ aliases?: readonly string[]; }; /** Advisory only: configured ids absent from this successful server listing; never eligibility. */ unlistedConfiguredModelIds?: readonly string[]; }; //#endregion //#region src/agents/model-catalog.types.d.ts type ModelInputType = "text" | "image" | "audio" | "video" | "document"; type ModelCatalogEntry = { /** Native catalog owner, not a physical provider route or transferable readiness fact. */ nativeRuntime?: string; id: string; name: string; provider: string; /** Provider-owned strongest-first picker order; internal and never projected to clients. */ providerOrder?: number; alias?: string; api?: ModelApi; /** Declared task support for the exact physical route; not authorization or readiness. */ inference?: ModelInferenceCapabilities; /** Private transport provenance for route matching; never project directly to clients. */ baseUrl?: string; contextWindow?: number; contextWindows?: ModelCatalogContextWindowOption[]; contextWindowDefault?: string; contextTokens?: number; /** Provider/catalog-declared total parameter count. */ parameterCount?: number; /** Provider/catalog-declared developer lineage for this exact route; never inferred from ids. */ family?: string; /** Visible failed-acquisition starter; sizing comes from current static or accepted owner facts. */ contextCapacitySource?: "unaccepted-starter"; /** Provider-declared unknown-model estimate; not an authored or curated static limit. */ contextWindowSource?: "synthetic"; reasoning?: boolean; /** Config-authored reasoning override; internal provenance, never project to clients. */ configuredReasoning?: boolean; /** Concrete runtime owner of thinking policy; internal and never project to clients. */ thinkingPolicyProvider?: string; /** Provider-owned effort support for this exact physical model route. */ thinkingLevelMap?: ThinkingLevelMap; input?: ModelInputType[]; params?: Record<string, unknown>; compat?: ModelCompatConfig; mediaInput?: ModelMediaInputConfig; status?: ModelCatalogStatus; statusReason?: string; replaces?: string[]; replacedBy?: string; }; /** Logical catalog rows plus the physical variants used for route selection. */ type ModelCatalogSnapshot = { entries: ModelCatalogEntry[]; routeVariants: ModelCatalogEntry[]; /** Provider-owned outcome of each live catalog request in this generation. */ providerOutcomes?: readonly ProviderCatalogOutcome[]; /** Previously accepted inventory remains bound to these provider/profile identities. */ acceptedDiscoveryOrigins?: readonly Pick<ProviderCatalogOutcome, "provider" | "profileId">[]; /** Native discovery facts belong to their harness, independently of API-provider auth. */ nativeProviderOutcomes?: Readonly<Record<string, readonly ProviderCatalogOutcome[]>>; /** Untagged harness observations, before API donor enrichment; each runtime owns its scope. */ nativeHostRows?: Readonly<Record<string, readonly ModelCatalogEntry[]>>; /** The current acquisition failed while this published inventory remained available. */ refreshFailed?: boolean; /** Provider discovery is in progress; existing rows remain usable. */ pendingProviders?: readonly string[]; /** Static provider-hook rows captured alongside the full lifecycle generation. */ staticEntries?: ModelCatalogEntry[]; /** * `false` only when this snapshot came from a degraded load (discovery threw, * static or empty fallback). Absent/`true` means authoritative — consumers that * destroy durable state (e.g. resetting a pinned model override) must treat only * an explicit `false` as degraded, so unrelated hand-built snapshots stay safe. */ authoritative?: boolean; }; //#endregion export { ModelCatalogSnapshot as n, ProviderCatalogOutcome as r, ModelCatalogEntry as t };