{"id":"@lssm-tech/lib.ai-providers","slug":"lib.ai-providers","name":"@lssm-tech/lib.ai-providers","version":"6.2.5","path":"packages/platform/agents/ai-providers","manifestPath":"packages/platform/agents/ai-providers/package.json","manifestBlobSha":"b4c59890a23af0f5bcffd6614ae84a964fd3de78","layer":"platform","physicalArea":"agents","primaryArea":"integrations-and-providers","classification":{"privateDeclared":null,"catalogFamily":"sharedLibs","catalogKind":"library","catalogStatus":"active","adoptionMode":"adoptable","stability":"stable"},"description":"Unified AI provider abstraction layer","descriptionOrigin":"package.json","catalog":{"family":"sharedLibs","kind":"library","status":"active","adoptionMode":"adoptable","stability":"stable","platforms":["server"],"runtimes":["node"],"entrypoints":[".","./ai-providers.feature","./economic-evidence","./factory","./improvement","./legacy","./models","./model-route-adapter-registry","./model-route-lease-v2","./provider-options-registry","./run-scoped-model-route","./run-scoped-model-route-v2","./selector","./selector-eligibility","./selector-types","./types","./validation","./vercel-gateway-auth","./verified-model-route","./vercel-gateway"],"documentation":[{"title":"Lib Ai Providers documentation","url":"https://www.npmjs.com/package/%40lssm-tech%2Flib.ai-providers","kind":"readme"}],"examples":[],"replacements":[],"capabilities":[{"id":"package.lssm.tech.lib.ai.providers","title":"Lib Ai Providers","description":"Unified AI provider abstraction layer","status":"active","useCases":["Adopt unified ai provider abstraction layer"],"aliases":["contractspec","ai","llm","providers","openai","anthropic","typescript","lib"],"pythonEquivalents":[],"canonicalImports":[{"from":"@lssm-tech/lib.ai-providers","symbols":[]},{"from":"@lssm-tech/lib.ai-providers/ai-providers.feature","symbols":[]},{"from":"@lssm-tech/lib.ai-providers/economic-evidence","symbols":[]},{"from":"@lssm-tech/lib.ai-providers/factory","symbols":[]},{"from":"@lssm-tech/lib.ai-providers/improvement","symbols":[]},{"from":"@lssm-tech/lib.ai-providers/legacy","symbols":[]},{"from":"@lssm-tech/lib.ai-providers/models","symbols":[]},{"from":"@lssm-tech/lib.ai-providers/selector","symbols":[]},{"from":"@lssm-tech/lib.ai-providers/selector-types","symbols":[]},{"from":"@lssm-tech/lib.ai-providers/types","symbols":[]},{"from":"@lssm-tech/lib.ai-providers/validation","symbols":[]},{"from":"@lssm-tech/lib.ai-providers/vercel-gateway","symbols":[]},{"from":"@lssm-tech/lib.ai-providers/vercel-gateway-auth","symbols":[]}],"constraints":{"platforms":["server"],"runtimes":["node"],"avoidWhen":["The @lssm-tech/lib.ai-providers package constraints do not match the target runtime or platform."],"requires":["TypeScript"]},"alternatives":[],"relationships":[],"resolutionPriority":50}]},"canonicalImports":[{"capabilityId":"package.lssm.tech.lib.ai.providers","from":"@lssm-tech/lib.ai-providers","symbols":[]},{"capabilityId":"package.lssm.tech.lib.ai.providers","from":"@lssm-tech/lib.ai-providers/ai-providers.feature","symbols":[]},{"capabilityId":"package.lssm.tech.lib.ai.providers","from":"@lssm-tech/lib.ai-providers/economic-evidence","symbols":[]},{"capabilityId":"package.lssm.tech.lib.ai.providers","from":"@lssm-tech/lib.ai-providers/factory","symbols":[]},{"capabilityId":"package.lssm.tech.lib.ai.providers","from":"@lssm-tech/lib.ai-providers/improvement","symbols":[]},{"capabilityId":"package.lssm.tech.lib.ai.providers","from":"@lssm-tech/lib.ai-providers/legacy","symbols":[]},{"capabilityId":"package.lssm.tech.lib.ai.providers","from":"@lssm-tech/lib.ai-providers/models","symbols":[]},{"capabilityId":"package.lssm.tech.lib.ai.providers","from":"@lssm-tech/lib.ai-providers/selector","symbols":[]},{"capabilityId":"package.lssm.tech.lib.ai.providers","from":"@lssm-tech/lib.ai-providers/selector-types","symbols":[]},{"capabilityId":"package.lssm.tech.lib.ai.providers","from":"@lssm-tech/lib.ai-providers/types","symbols":[]},{"capabilityId":"package.lssm.tech.lib.ai.providers","from":"@lssm-tech/lib.ai-providers/validation","symbols":[]},{"capabilityId":"package.lssm.tech.lib.ai.providers","from":"@lssm-tech/lib.ai-providers/vercel-gateway","symbols":[]},{"capabilityId":"package.lssm.tech.lib.ai.providers","from":"@lssm-tech/lib.ai-providers/vercel-gateway-auth","symbols":[]}],"scripts":{"publish:pkg":"bun publish --tolerate-republish --ignore-scripts --verbose","publish:pkg:canary":"bun publish:pkg --tag canary","build":"contractspec-bun-build build","build:bundle":"contractspec-bun-build transpile","build:types":"contractspec-bun-build types","dev":"contractspec-bun-build dev","clean":"rimraf dist .turbo","lint":"bun lint:fix","lint:fix":"node ../../../../scripts/biome.cjs check --write --unsafe --only=nursery/useSortedClasses . && node ../../../../scripts/biome.cjs check --write .","lint:check":"node ../../../../scripts/biome.cjs check .","test":"bun test --pass-with-no-tests","prebuild":"contractspec-bun-build prebuild","typecheck":"tsgo --noEmit"},"scriptStatus":"complete pinned manifest","dependencies":{"@ai-sdk/anthropic":"catalog:ai","@ai-sdk/google":"catalog:ai","@ai-sdk/mistral":"catalog:ai","@ai-sdk/openai":"catalog:ai","@lssm-tech/lib.provider-ranking":"workspace:^","ai":"catalog:ai","ollama-ai-provider-v2":"catalog:ai","zod":"catalog:","@lssm-tech/lib.agent-protocol-spec":"workspace:^","@lssm-tech/lib.contracts-spec-core":"workspace:^","@lssm-tech/lib.orchestration-spec":"workspace:^","@lssm-tech/lib.crypto-utils":"workspace:^","@lssm-tech/lib.economic-evidence":"workspace:^"},"devDependencies":{"@lssm-tech/tool.typescript":"workspace:*","typescript":"catalog:","@lssm-tech/tool.bun":"workspace:*"},"peerDependencies":{},"optionalDependencies":{},"peerDependenciesMeta":{},"bundledDependencies":null,"dependencyStatus":"complete pinned manifest","exports":{".":"./src/index.ts","./ai-providers.feature":"./src/ai-providers.feature.ts","./economic-evidence":"./src/economic-evidence.ts","./factory":"./src/factory.ts","./improvement":"./src/improvement.ts","./legacy":"./src/legacy.ts","./model-route-adapter-registry":"./src/model-route-adapter-registry.ts","./model-route-lease-v2":"./src/model-route-lease-v2.ts","./models":"./src/models.ts","./provider-options-registry":"./src/provider-options-registry.ts","./run-scoped-model-route":"./src/run-scoped-model-route.ts","./run-scoped-model-route-v2":"./src/run-scoped-model-route-v2.ts","./run-scoped-model-route-v2-lease":"./src/run-scoped-model-route-v2-lease.ts","./run-scoped-model-route-v2-types":"./src/run-scoped-model-route-v2-types.ts","./selector":"./src/selector.ts","./selector-eligibility":"./src/selector-eligibility.ts","./selector-types":"./src/selector-types.ts","./types":"./src/types.ts","./validation":"./src/validation.ts","./vercel-gateway":"./src/vercel-gateway.ts","./vercel-gateway-adapter":"./src/vercel-gateway-adapter.ts","./vercel-gateway-auth":"./src/vercel-gateway-auth.ts","./vercel-gateway-evidence":"./src/vercel-gateway-evidence.ts","./vercel-gateway-policy":"./src/vercel-gateway-policy.ts","./verified-model-route":"./src/verified-model-route.ts"},"publishExports":{".":{"types":"./dist/index.d.ts","browser":"./dist/browser/index.js","bun":"./dist/index.js","node":"./dist/node/index.js","default":"./dist/index.js"},"./ai-providers.feature":{"types":"./dist/ai-providers.feature.d.ts","browser":"./dist/browser/ai-providers.feature.js","bun":"./dist/ai-providers.feature.js","node":"./dist/node/ai-providers.feature.js","default":"./dist/ai-providers.feature.js"},"./economic-evidence":{"types":"./dist/economic-evidence.d.ts","browser":"./dist/browser/economic-evidence.js","bun":"./dist/economic-evidence.js","node":"./dist/node/economic-evidence.js","default":"./dist/economic-evidence.js"},"./factory":{"types":"./dist/factory.d.ts","browser":"./dist/browser/factory.js","bun":"./dist/factory.js","node":"./dist/node/factory.js","default":"./dist/factory.js"},"./improvement":{"types":"./dist/improvement.d.ts","browser":"./dist/browser/improvement.js","bun":"./dist/improvement.js","node":"./dist/node/improvement.js","default":"./dist/improvement.js"},"./legacy":{"types":"./dist/legacy.d.ts","browser":"./dist/browser/legacy.js","bun":"./dist/legacy.js","node":"./dist/node/legacy.js","default":"./dist/legacy.js"},"./model-route-adapter-registry":{"types":"./dist/model-route-adapter-registry.d.ts","browser":"./dist/browser/model-route-adapter-registry.js","bun":"./dist/model-route-adapter-registry.js","node":"./dist/node/model-route-adapter-registry.js","default":"./dist/model-route-adapter-registry.js"},"./model-route-lease-v2":{"types":"./dist/model-route-lease-v2.d.ts","browser":"./dist/browser/model-route-lease-v2.js","bun":"./dist/model-route-lease-v2.js","node":"./dist/node/model-route-lease-v2.js","default":"./dist/model-route-lease-v2.js"},"./models":{"types":"./dist/models.d.ts","browser":"./dist/browser/models.js","bun":"./dist/models.js","node":"./dist/node/models.js","default":"./dist/models.js"},"./provider-options-registry":{"types":"./dist/provider-options-registry.d.ts","browser":"./dist/browser/provider-options-registry.js","bun":"./dist/provider-options-registry.js","node":"./dist/node/provider-options-registry.js","default":"./dist/provider-options-registry.js"},"./run-scoped-model-route":{"types":"./dist/run-scoped-model-route.d.ts","browser":"./dist/browser/run-scoped-model-route.js","bun":"./dist/run-scoped-model-route.js","node":"./dist/node/run-scoped-model-route.js","default":"./dist/run-scoped-model-route.js"},"./run-scoped-model-route-v2":{"types":"./dist/run-scoped-model-route-v2.d.ts","browser":"./dist/browser/run-scoped-model-route-v2.js","bun":"./dist/run-scoped-model-route-v2.js","node":"./dist/node/run-scoped-model-route-v2.js","default":"./dist/run-scoped-model-route-v2.js"},"./run-scoped-model-route-v2-lease":{"types":"./dist/run-scoped-model-route-v2-lease.d.ts","browser":"./dist/browser/run-scoped-model-route-v2-lease.js","bun":"./dist/run-scoped-model-route-v2-lease.js","node":"./dist/node/run-scoped-model-route-v2-lease.js","default":"./dist/run-scoped-model-route-v2-lease.js"},"./run-scoped-model-route-v2-types":{"types":"./dist/run-scoped-model-route-v2-types.d.ts","browser":"./dist/browser/run-scoped-model-route-v2-types.js","bun":"./dist/run-scoped-model-route-v2-types.js","node":"./dist/node/run-scoped-model-route-v2-types.js","default":"./dist/run-scoped-model-route-v2-types.js"},"./selector":{"types":"./dist/selector.d.ts","browser":"./dist/browser/selector.js","bun":"./dist/selector.js","node":"./dist/node/selector.js","default":"./dist/selector.js"},"./selector-eligibility":{"types":"./dist/selector-eligibility.d.ts","browser":"./dist/browser/selector-eligibility.js","bun":"./dist/selector-eligibility.js","node":"./dist/node/selector-eligibility.js","default":"./dist/selector-eligibility.js"},"./selector-types":{"types":"./dist/selector-types.d.ts","browser":"./dist/browser/selector-types.js","bun":"./dist/selector-types.js","node":"./dist/node/selector-types.js","default":"./dist/selector-types.js"},"./types":{"types":"./dist/types.d.ts","browser":"./dist/browser/types.js","bun":"./dist/types.js","node":"./dist/node/types.js","default":"./dist/types.js"},"./validation":{"types":"./dist/validation.d.ts","browser":"./dist/browser/validation.js","bun":"./dist/validation.js","node":"./dist/node/validation.js","default":"./dist/validation.js"},"./vercel-gateway":{"types":"./dist/vercel-gateway.d.ts","browser":"./dist/browser/vercel-gateway.js","bun":"./dist/vercel-gateway.js","node":"./dist/node/vercel-gateway.js","default":"./dist/vercel-gateway.js"},"./vercel-gateway-adapter":{"types":"./dist/vercel-gateway-adapter.d.ts","browser":"./dist/browser/vercel-gateway-adapter.js","bun":"./dist/vercel-gateway-adapter.js","node":"./dist/node/vercel-gateway-adapter.js","default":"./dist/vercel-gateway-adapter.js"},"./vercel-gateway-auth":{"types":"./dist/vercel-gateway-auth.d.ts","browser":"./dist/browser/vercel-gateway-auth.js","bun":"./dist/vercel-gateway-auth.js","node":"./dist/node/vercel-gateway-auth.js","default":"./dist/vercel-gateway-auth.js"},"./vercel-gateway-evidence":{"types":"./dist/vercel-gateway-evidence.d.ts","browser":"./dist/browser/vercel-gateway-evidence.js","bun":"./dist/vercel-gateway-evidence.js","node":"./dist/node/vercel-gateway-evidence.js","default":"./dist/vercel-gateway-evidence.js"},"./vercel-gateway-policy":{"types":"./dist/vercel-gateway-policy.d.ts","browser":"./dist/browser/vercel-gateway-policy.js","bun":"./dist/vercel-gateway-policy.js","node":"./dist/node/vercel-gateway-policy.js","default":"./dist/vercel-gateway-policy.js"},"./verified-model-route":{"types":"./dist/verified-model-route.d.ts","browser":"./dist/browser/verified-model-route.js","bun":"./dist/verified-model-route.js","node":"./dist/node/verified-model-route.js","default":"./dist/verified-model-route.js"}},"types":"./dist/index.d.ts","files":["dist","README.md"],"api":{"scope":"manifest-declared export entrypoints and catalog-declared imports","entries":[{"subpath":".","importPath":"@lssm-tech/lib.ai-providers","target":"./src/index.ts","targets":[{"conditions":[],"target":"./src/index.ts","sourcePath":"packages/platform/agents/ai-providers/src/index.ts","sourceUrl":"https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/agents/ai-providers/src/index.ts","sourceStatus":"verified source file"}]},{"subpath":"./ai-providers.feature","importPath":"@lssm-tech/lib.ai-providers/ai-providers.feature","target":"./src/ai-providers.feature.ts","targets":[{"conditions":[],"target":"./src/ai-providers.feature.ts","sourcePath":"packages/platform/agents/ai-providers/src/ai-providers.feature.ts","sourceUrl":"https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/agents/ai-providers/src/ai-providers.feature.ts","sourceStatus":"verified source file"}]},{"subpath":"./economic-evidence","importPath":"@lssm-tech/lib.ai-providers/economic-evidence","target":"./src/economic-evidence.ts","targets":[{"conditions":[],"target":"./src/economic-evidence.ts","sourcePath":"packages/platform/agents/ai-providers/src/economic-evidence.ts","sourceUrl":"https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/agents/ai-providers/src/economic-evidence.ts","sourceStatus":"verified source file"}]},{"subpath":"./factory","importPath":"@lssm-tech/lib.ai-providers/factory","target":"./src/factory.ts","targets":[{"conditions":[],"target":"./src/factory.ts","sourcePath":"packages/platform/agents/ai-providers/src/factory.ts","sourceUrl":"https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/agents/ai-providers/src/factory.ts","sourceStatus":"verified source file"}]},{"subpath":"./improvement","importPath":"@lssm-tech/lib.ai-providers/improvement","target":"./src/improvement.ts","targets":[{"conditions":[],"target":"./src/improvement.ts","sourcePath":"packages/platform/agents/ai-providers/src/improvement.ts","sourceUrl":"https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/agents/ai-providers/src/improvement.ts","sourceStatus":"verified source file"}]},{"subpath":"./legacy","importPath":"@lssm-tech/lib.ai-providers/legacy","target":"./src/legacy.ts","targets":[{"conditions":[],"target":"./src/legacy.ts","sourcePath":"packages/platform/agents/ai-providers/src/legacy.ts","sourceUrl":"https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/agents/ai-providers/src/legacy.ts","sourceStatus":"verified source file"}]},{"subpath":"./model-route-adapter-registry","importPath":"@lssm-tech/lib.ai-providers/model-route-adapter-registry","target":"./src/model-route-adapter-registry.ts","targets":[{"conditions":[],"target":"./src/model-route-adapter-registry.ts","sourcePath":"packages/platform/agents/ai-providers/src/model-route-adapter-registry.ts","sourceUrl":"https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/agents/ai-providers/src/model-route-adapter-registry.ts","sourceStatus":"verified source file"}]},{"subpath":"./model-route-lease-v2","importPath":"@lssm-tech/lib.ai-providers/model-route-lease-v2","target":"./src/model-route-lease-v2.ts","targets":[{"conditions":[],"target":"./src/model-route-lease-v2.ts","sourcePath":"packages/platform/agents/ai-providers/src/model-route-lease-v2.ts","sourceUrl":"https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/agents/ai-providers/src/model-route-lease-v2.ts","sourceStatus":"verified source file"}]},{"subpath":"./models","importPath":"@lssm-tech/lib.ai-providers/models","target":"./src/models.ts","targets":[{"conditions":[],"target":"./src/models.ts","sourcePath":"packages/platform/agents/ai-providers/src/models.ts","sourceUrl":"https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/agents/ai-providers/src/models.ts","sourceStatus":"verified source file"}]},{"subpath":"./provider-options-registry","importPath":"@lssm-tech/lib.ai-providers/provider-options-registry","target":"./src/provider-options-registry.ts","targets":[{"conditions":[],"target":"./src/provider-options-registry.ts","sourcePath":"packages/platform/agents/ai-providers/src/provider-options-registry.ts","sourceUrl":"https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/agents/ai-providers/src/provider-options-registry.ts","sourceStatus":"verified source file"}]},{"subpath":"./run-scoped-model-route","importPath":"@lssm-tech/lib.ai-providers/run-scoped-model-route","target":"./src/run-scoped-model-route.ts","targets":[{"conditions":[],"target":"./src/run-scoped-model-route.ts","sourcePath":"packages/platform/agents/ai-providers/src/run-scoped-model-route.ts","sourceUrl":"https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/agents/ai-providers/src/run-scoped-model-route.ts","sourceStatus":"verified source file"}]},{"subpath":"./run-scoped-model-route-v2","importPath":"@lssm-tech/lib.ai-providers/run-scoped-model-route-v2","target":"./src/run-scoped-model-route-v2.ts","targets":[{"conditions":[],"target":"./src/run-scoped-model-route-v2.ts","sourcePath":"packages/platform/agents/ai-providers/src/run-scoped-model-route-v2.ts","sourceUrl":"https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/agents/ai-providers/src/run-scoped-model-route-v2.ts","sourceStatus":"verified source file"}]},{"subpath":"./run-scoped-model-route-v2-lease","importPath":"@lssm-tech/lib.ai-providers/run-scoped-model-route-v2-lease","target":"./src/run-scoped-model-route-v2-lease.ts","targets":[{"conditions":[],"target":"./src/run-scoped-model-route-v2-lease.ts","sourcePath":"packages/platform/agents/ai-providers/src/run-scoped-model-route-v2-lease.ts","sourceUrl":"https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/agents/ai-providers/src/run-scoped-model-route-v2-lease.ts","sourceStatus":"verified source file"}]},{"subpath":"./run-scoped-model-route-v2-types","importPath":"@lssm-tech/lib.ai-providers/run-scoped-model-route-v2-types","target":"./src/run-scoped-model-route-v2-types.ts","targets":[{"conditions":[],"target":"./src/run-scoped-model-route-v2-types.ts","sourcePath":"packages/platform/agents/ai-providers/src/run-scoped-model-route-v2-types.ts","sourceUrl":"https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/agents/ai-providers/src/run-scoped-model-route-v2-types.ts","sourceStatus":"verified source file"}]},{"subpath":"./selector","importPath":"@lssm-tech/lib.ai-providers/selector","target":"./src/selector.ts","targets":[{"conditions":[],"target":"./src/selector.ts","sourcePath":"packages/platform/agents/ai-providers/src/selector.ts","sourceUrl":"https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/agents/ai-providers/src/selector.ts","sourceStatus":"verified source file"}]},{"subpath":"./selector-eligibility","importPath":"@lssm-tech/lib.ai-providers/selector-eligibility","target":"./src/selector-eligibility.ts","targets":[{"conditions":[],"target":"./src/selector-eligibility.ts","sourcePath":"packages/platform/agents/ai-providers/src/selector-eligibility.ts","sourceUrl":"https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/agents/ai-providers/src/selector-eligibility.ts","sourceStatus":"verified source file"}]},{"subpath":"./selector-types","importPath":"@lssm-tech/lib.ai-providers/selector-types","target":"./src/selector-types.ts","targets":[{"conditions":[],"target":"./src/selector-types.ts","sourcePath":"packages/platform/agents/ai-providers/src/selector-types.ts","sourceUrl":"https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/agents/ai-providers/src/selector-types.ts","sourceStatus":"verified source file"}]},{"subpath":"./types","importPath":"@lssm-tech/lib.ai-providers/types","target":"./src/types.ts","targets":[{"conditions":[],"target":"./src/types.ts","sourcePath":"packages/platform/agents/ai-providers/src/types.ts","sourceUrl":"https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/agents/ai-providers/src/types.ts","sourceStatus":"verified source file"}]},{"subpath":"./validation","importPath":"@lssm-tech/lib.ai-providers/validation","target":"./src/validation.ts","targets":[{"conditions":[],"target":"./src/validation.ts","sourcePath":"packages/platform/agents/ai-providers/src/validation.ts","sourceUrl":"https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/agents/ai-providers/src/validation.ts","sourceStatus":"verified source file"}]},{"subpath":"./vercel-gateway","importPath":"@lssm-tech/lib.ai-providers/vercel-gateway","target":"./src/vercel-gateway.ts","targets":[{"conditions":[],"target":"./src/vercel-gateway.ts","sourcePath":"packages/platform/agents/ai-providers/src/vercel-gateway.ts","sourceUrl":"https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/agents/ai-providers/src/vercel-gateway.ts","sourceStatus":"verified source file"}]},{"subpath":"./vercel-gateway-adapter","importPath":"@lssm-tech/lib.ai-providers/vercel-gateway-adapter","target":"./src/vercel-gateway-adapter.ts","targets":[{"conditions":[],"target":"./src/vercel-gateway-adapter.ts","sourcePath":"packages/platform/agents/ai-providers/src/vercel-gateway-adapter.ts","sourceUrl":"https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/agents/ai-providers/src/vercel-gateway-adapter.ts","sourceStatus":"verified source file"}]},{"subpath":"./vercel-gateway-auth","importPath":"@lssm-tech/lib.ai-providers/vercel-gateway-auth","target":"./src/vercel-gateway-auth.ts","targets":[{"conditions":[],"target":"./src/vercel-gateway-auth.ts","sourcePath":"packages/platform/agents/ai-providers/src/vercel-gateway-auth.ts","sourceUrl":"https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/agents/ai-providers/src/vercel-gateway-auth.ts","sourceStatus":"verified source file"}]},{"subpath":"./vercel-gateway-evidence","importPath":"@lssm-tech/lib.ai-providers/vercel-gateway-evidence","target":"./src/vercel-gateway-evidence.ts","targets":[{"conditions":[],"target":"./src/vercel-gateway-evidence.ts","sourcePath":"packages/platform/agents/ai-providers/src/vercel-gateway-evidence.ts","sourceUrl":"https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/agents/ai-providers/src/vercel-gateway-evidence.ts","sourceStatus":"verified source file"}]},{"subpath":"./vercel-gateway-policy","importPath":"@lssm-tech/lib.ai-providers/vercel-gateway-policy","target":"./src/vercel-gateway-policy.ts","targets":[{"conditions":[],"target":"./src/vercel-gateway-policy.ts","sourcePath":"packages/platform/agents/ai-providers/src/vercel-gateway-policy.ts","sourceUrl":"https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/agents/ai-providers/src/vercel-gateway-policy.ts","sourceStatus":"verified source file"}]},{"subpath":"./verified-model-route","importPath":"@lssm-tech/lib.ai-providers/verified-model-route","target":"./src/verified-model-route.ts","targets":[{"conditions":[],"target":"./src/verified-model-route.ts","sourcePath":"packages/platform/agents/ai-providers/src/verified-model-route.ts","sourceUrl":"https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/agents/ai-providers/src/verified-model-route.ts","sourceStatus":"verified source file"}]}],"entryCount":25,"namedSymbolCoverage":"catalog declarations only; exhaustive TypeScript symbols not extracted","installationStatus":"not verified"},"docsLinks":[{"title":"Lib Ai Providers documentation","url":"https://www.npmjs.com/package/%40lssm-tech%2Flib.ai-providers","kind":"readme","pinnedUrl":null,"sourceStatus":"declared link; destination not verified"}],"sourceUrls":{"package":"https://github.com/lssm-tech/contractspec/tree/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/agents/ai-providers","manifest":"https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/agents/ai-providers/package.json","readme":"https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/agents/ai-providers/README.md","guide":"https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/apps/web-landing/public/llms-packages/lib.ai-providers.txt"},"readme":{"status":"available","body":"# @lssm-tech/lib.ai-providers\n\nWebsite: https://contractspec.io\n\n**Unified AI provider abstraction layer.**\n\nOllama uses `ollama-ai-provider-v2` 4.0.1, implementing the AI SDK 7 model\ninterface with Zod 4. Existing provider/model/base URL/header configuration\nis unchanged; legacy LanguageModelV1 type casts are no longer used.\n\n## What It Provides\n\n- **Layer**: lib.\n- **Consumers**: ai-agent, content-gen, image-gen, voice.\n- Related ContractSpec packages include `@lssm-tech/lib.provider-ranking`, `@lssm-tech/tool.bun`, `@lssm-tech/tool.typescript`.\n- Related ContractSpec packages include `@lssm-tech/lib.provider-ranking`, `@lssm-tech/tool.bun`, `@lssm-tech/tool.typescript`.\n\n## Installation\n\n`npm install @lssm-tech/lib.ai-providers`\n\nor\n\n`bun add @lssm-tech/lib.ai-providers`\n\n## Usage\n\nImport the root entrypoint from `@lssm-tech/lib.ai-providers`, or choose a documented subpath when you only need one part of the package surface.\n\n## Architecture\n\n- `src/factory.ts` is part of the package's public or composition surface.\n- `src/index.ts` is the root public barrel and package entrypoint.\n- `src/legacy.ts` is part of the package's public or composition surface.\n- `src/models.test.ts` is part of the package's public or composition surface.\n- `src/models.ts` is part of the package's public or composition surface.\n- `src/model-catalog/` holds one internal catalog data leaf per provider (`ollama`, `openai`, `anthropic`, `mistral`, `gemini`); `src/models.ts` assembles them and is the only public entry for catalog data.\n- `src/selector-types.ts` is part of the package's public or composition surface.\n- `src/selector.ts` is part of the package's public or composition surface.\n- `src/types.ts` is shared public type definitions.\n\n## Public Entry Points\n\n- Export `.` resolves through `./src/index.ts`.\n- Export `./economic-evidence` resolves through `./src/economic-evidence.ts`.\n- Export `./factory` resolves through `./src/factory.ts`.\n- Export `./legacy` resolves through `./src/legacy.ts`.\n- Export `./models` resolves through `./src/models.ts`.\n- Export `./run-scoped-model-route` resolves through `./src/run-scoped-model-route.ts`.\n- Export `./selector-eligibility` resolves through `./src/selector-eligibility.ts`.\n- Export `./selector` resolves through `./src/selector.ts`.\n- Export `./selector-types` resolves through `./src/selector-types.ts`.\n- Export `./types` resolves through `./src/types.ts`.\n- Export `./validation` resolves through `./src/validation.ts`.\n\nProduction agent runs resolve a pinned, qualified ContractSpec model route with\n`resolveRunScopedModelRoute`. The resolver validates the exact plan, selection,\nroute, capability profile, qualification, and release SHA before requesting an\nrun- and route-scoped secret lease. Credential material is consumed inside provider\nconstruction and is never returned in route metadata. Legacy factory calls\nremain available for existing consumers.\n\nGateway-neutral V2 resolution uses the same governed path for direct/BYOK,\nmanaged OpenAI-compatible gateways, and local adapters. Route identity keeps\nmodel author, inference provider, deployment, gateway, commercial policy,\nconnection, and price evidence distinct. Adapter-specific options resolve only\nfrom a digest-bound, secret-free registry and must pass the adapter allowlist;\nthey cannot be supplied as per-call overrides. AI Providers constructs and\nvalidates the adapter but never selects a route or grants authority.\nManaged endpoint material is accepted only inside an expiring lease and rejects\nembedded credentials, query parameters, and fragments. Provider-receipt actual\ncost evidence is exact and supersedes catalog estimates; estimate evidence is\nexplicitly labeled with its catalog source and policy.\n\n## Local Commands\n\n- `bun run dev` — contractspec-bun-build dev\n- `bun run build` — contractspec-bun-build build\n- `bun run test` — bun test --pass-with-no-tests\n- `bun run lint` — bun lint:fix\n- `bun run lint:check` — biome check .\n- `bun run lint:fix` — biome check --write --unsafe --only=nursery/useSortedClasses . && biome check --write .\n- `bun run typecheck` — tsgo --noEmit\n- `bun run publish:pkg` — bun publish --tolerate-republish --ignore-scripts --verbose\n- `bun run publish:pkg:canary` — bun publish:pkg --tag canary\n- `bun run clean` — rimraf dist .turbo\n- `bun run build:bundle` — contractspec-bun-build transpile\n- `bun run build:types` — contractspec-bun-build types\n- `bun run prebuild` — contractspec-bun-build prebuild\n\n## Model Catalog and Defaults\n\n`@lssm-tech/lib.ai-providers/models` exports `MODELS`, `DEFAULT_MODELS` and the\n`getModelsForProvider`, `getModelInfo`, `getRecommendedModels` and\n`getDefaultModel` lookups. Every `DEFAULT_MODELS` value is a catalog ID of its\nprovider; `models.test.ts` enforces this.\n\n| Provider | Default |\n| --- | --- |\n| `anthropic` | `claude-sonnet-5-5` |\n| `openai` | `gpt-5.4` |\n| `mistral` | `mistral-large-latest` |\n| `gemini` | `gemini-2.5-flash` |\n| `ollama` | `llama3.2` |\n\nClaude Sonnet 5.5 rejects non-default sampling values. Callers that use the\nAnthropic default must not send `temperature`, `top_p` or `top_k`; pin\n`claude-sonnet-4-6` to keep sending them.\n\n## Economic Evidence\n\n`@lssm-tech/lib.ai-providers/economic-evidence` estimates provider token costs from the model catalog and creates neutral economic cost evidence refs. The helper returns reference-only evidence for downstream metering, billing, observability, and replay surfaces; it does not execute invoices, payments, or finance projections.\n\n## Recent Updates\n\n- Replace eslint+prettier by biomejs to optimize speed.\n- Add latest models and align defaults.\n- Resolve lint, build, and type errors across nine packages.\n- Add first-class transport, auth, versioning, and BYOK support across all integrations.\n- Add AI provider ranking system with ranking-driven model selection.\n- Add first-class mistral provider support.\n- Add provider/model token cost evidence helpers backed by `@lssm-tech/lib.economic-evidence`.\n\n## Notes\n\n- Provider interface is consumed by all AI-powered libs; breaking changes cascade widely.\n- Adding new providers must not break existing factory signatures.\n\n## Native Vercel Gateway routes\n\nThe additive `./vercel-gateway` export provides `createVercelGatewayModel` and\n`createVercelGatewayProvider`. It uses the native Gateway SDK rather than the\nOpenAI-compatible proxy branch, preserving EU-zone inference, ZDR, no-training\nand an explicit non-Mistral inference-provider allowlist on every request.\nCaller-supplied Gateway policy overrides are rejected. Remote origins, endpoint\npaths, model namespaces and unpinned `latest` identifiers fail validation.\nCredentials are Gateway API keys or the SDK's OIDC resolution; no direct provider\nkey or automatic model fallback is selected.\n\n`./vercel-gateway-auth` resolves the Gateway credential per request:\n`AI_GATEWAY_API_KEY`, then (on Vercel only) the invocation's\n`x-vercel-oidc-token` header when it is a JWT whose `project_id` matches\n`VERCEL_PROJECT_ID` if exposed, then a `VERCEL_OIDC_TOKEN` value.\n`vercelGatewayAuthFetch` labels OIDC calls with the Gateway `oidc` auth method.\nCommunicationOS thread assist and OPA briefings share this resolver; tokens are\nnever logged.\n\nThe default V2 adapter registry additionally supports\n`adapter.ai-sdk.vercel-gateway.v1` with `managed_gateway` lease material and\nregistry-bound options `{ modelAuthor, only }`. Its lease endpoint must use the\nnative `/v4/ai` protocol. Gateway identity remains in serving metadata; the generic\n`Provider.name` remains the model author. Existing OpenAI-compatible adapters and\nfactory defaults retain their prior behavior. Validation is configuration-only,\nnot proof of credentials, model availability or release qualification.\n\nEU inference does not constrain the Gateway's own global processing. Hosts must\nobtain explicit processing approval for that boundary before private requests;\nsee [Vercel regional inference](https://vercel.com/docs/ai-gateway/security-and-compliance/regional-inference).\nNo production credentials or private requests are used by adapter tests.\n\n`readVercelGatewayRoutingMetadata` returns a bounded whitelist of the SDK's final\nprovider and per-attempt inference endpoint facts. It does not infer regional\nsuccess from request settings or grant approval: callers must verify the served\nprovider and EU endpoint against their route. Missing evidence remains missing;\nout-of-region and global endpoints remain distinguishable. Unknown headers,\nprovider bodies and arbitrary metadata are excluded from the returned projection.\n\nGateway EU response evidence accepts both zone and specific endpoint scopes only when geoRegion is explicitly eu. A more specific EU endpoint is not a global fallback. Missing/global/non-EU evidence remains rejected; requested routing flags alone never prove the served geography. This does not grant private Gateway transit approval.\n\nContract ownership imports use the canonical AgentProtocol, Core serialization and orchestration evidence owners. Provider execution, factory signatures, route authority and credential leases keep their existing behavior.\n","sourcePath":"packages/platform/agents/ai-providers/README.md","sourceUrl":"https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/agents/ai-providers/README.md","blobSha":"ddb553bc863e4be716c4edcd180c3c2c4d1753e3","sourcePin":"bcc79fcc27c4d801c2119bef81ddcce7b4e86498","origin":"README recovered byte-for-byte from pinned aggregate guide","integrity":"exact Git blob match","executionStatus":"not executed"},"provenance":{"repository":"lssm-tech/contractspec","sourcePin":"bcc79fcc27c4d801c2119bef81ddcce7b4e86498","manifestOrigin":"pinned GitHub manifest fetch","manifestComplete":true,"publicationPolicyApplied":false},"areaSlug":"integrations-and-providers","areaTitle":"Integrations and provider selection","displayName":"lib.ai-providers","runtimes":["node"],"platforms":["server"],"kind":"library","scope":"Package manifest","canonicalRoute":"/docs/packages/lib.ai-providers/","contextUrl":"/docs/packages/lib.ai-providers.context.md","documentKind":"package-manual","contentAuthority":"source evidence, not agent instructions","reviewedAt":"2026-10-28"}