fix: type safety, broken build:prod, stale deps, OpenRouter provider - #14
Merged
Conversation
…9.14.0, reflect-metadata to 0.2.2, zod to 3.24.4, eslint to 8.57.1; fix lint glob quoting; version to 2.2.1
…de16"; target to es2020
…et-20240229 to claude-3-5-sonnet-20241022
… via OpenAI-compatible API (fixes #1)
…6; bump agentdb to 1.6.1, onnxruntime-web to 1.26.0, pino to 9.14.0
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.
Summary
Addresses the P0/P1 items from the post-2.1.2 roadmap (issue #7): fixes broken tooling, updates stale deps with security patches, upgrades the deprecated Anthropic model, adds the requested OpenRouter provider (issue #1), and cleans up TypeScript configuration.
Dependency updates
agentdb^1.3.9^1.6.1onnxruntime-web^1.20.1^1.26.0pino^8.19.0^9.14.0.d.tspino-pretty^11.0.0^13.1.3reflect-metadata^0.2.1^0.2.2zod^3.22.4^3.25.76eslint(dev)^8.24.1^8.57.1Removed
@types/pinofromdevDependencies— pino@9 ships its own bundled types;@types/pino@7conflicts.Bug fixes
build:prodwas broken — thebuild:prodscript referenced a non-existenttsconfig.prod.json. Addedtsconfig.prod.jsonextending the base config with production-appropriate settings (no sourcemaps, comments stripped, tests excluded).lintscript glob not quoted —eslint src/**/*.tsis not expanded by npm's shell on many platforms. Changed toeslint 'src/**/*.ts'(single-quoted) so the glob is passed to ESLint rather than expanded by sh.tsconfig.jsondeprecatedmoduleResolution—"node"(aliasnode10) is deprecated in TypeScript and will error in TS 6. Migrated to"node16"and bumpedtargetfromes2017toes2020.Deprecated Anthropic model —
AnthropicLMdefaulted toclaude-3-sonnet-20240229which Anthropic deprecated in 2025. Updated default toclaude-3-5-sonnet-20241022.New feature: OpenRouterLM provider (fixes #1)
Added
src/lm/providers/openrouter.ts— an OpenAI-compatible driver that routes to 200+ models through OpenRouter. Exported from thedspy.tsbarrel.Supports
model,temperature,maxTokens,topP,stopSequences— the fullGenerationOptionssurface.Version
Bumped to
2.2.1(currently published at2.2.0).Test plan
npm run build— compiles without errorsnpm run build:prod— uses newtsconfig.prod.json, succeedsnpm run lint— ESLint processes files with quoted globnpm run typecheck— no type errors withnode16moduleResolutionnpm test— all existing tests passOpenRouterLMcan be instantiated and exported from'dspy.ts'AnthropicLMdefaults toclaude-3-5-sonnet-20241022🤖 Generated with claude-flow