Feature/openrouter integration#16
Merged
Merged
Conversation
Introduce a new @agentbase/plugin-openrouter-gateway plugin that routes AI model calls through OpenRouter. Implements model fetching with 1h cache, callWithFallback (automatic fallbacks on 429/5xx), per-user per-day cost tracking (cents), header helpers, and conversation/app hooks. Registers endpoints (GET /models, GET /usage, PUT /config, GET /config, POST /test) and includes manifest, package/tsconfig files, and comprehensive Jest tests for helpers, endpoints, hooks, and constants.
Add "ignoreDeprecations": "6.0" to the OpenRouter plugin tsconfig to suppress TypeScript 6.0 deprecation diagnostics during type checking. This reduces noise from deprecation warnings while keeping existing compiler options intact.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces a new plugin package,
openrouter-gateway, to the monorepo. It includes all necessary configuration, manifest, and dependency management files to support development, testing, and integration with the Agentbase ecosystem. Additionally, thepnpm-lock.yamlis updated to register the new package and adjust dependency resolutions for related dev tools.New Plugin Package Addition:
openrouter-gatewayplugin underpackages/plugins/official/, including configuration for plugin metadata, endpoints, settings, and permissions inmanifest.json.package.jsonwith build, test, and lint scripts, and specified dependencies and devDependencies for TypeScript and Jest integration.TypeScript and Testing Configuration:
tsconfig.jsonfor main sources,tsconfig.test.jsonfor tests, and__tests__/tsconfig.jsonfor test-specific settings. These ensure proper compilation and type checking for both source and test code. [1] [2] [3]Monorepo Dependency and Lockfile Updates:
pnpm-lock.yamlto include the newopenrouter-gatewaypackage, its dependencies, and to adjust Jest and TypeScript dependency graphs for all affected packages. This ensures consistent development and testing environments across the monorepo. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15]