Skip to content

feat: support openrouter provider pinning#332

Open
HwangJohn wants to merge 2 commits into
langchain-ai:mainfrom
HwangJohn:feat/openrouter-provider-pinning
Open

feat: support openrouter provider pinning#332
HwangJohn wants to merge 2 commits into
langchain-ai:mainfrom
HwangJohn:feat/openrouter-provider-pinning

Conversation

@HwangJohn

Copy link
Copy Markdown
Contributor

Summary

  • Add OPENWIKI_OPENROUTER_PROVIDER_ONLY to pin OpenRouter routing to one upstream provider or a comma-separated allowlist.
  • Pass the configured values to ChatOpenRouter as provider.only.
  • Persist and surface the new routing key in OpenWiki env diagnostics, and document the setting in the README.

Fixes #39.

Testing

  • corepack pnpm exec prettier --write README.md src/constants.ts src/env.ts src/agent/index.ts test/constants.test.ts
  • corepack pnpm exec vitest run test/constants.test.ts test/env.test.ts — passed
  • corepack pnpm run typecheck — passed
  • corepack pnpm exec vitest run test/constants.test.ts test/env.test.ts test/env-behavior.test.ts — only failed the existing Windows chmod assertion in test/env-behavior.test.ts > writes the env file with 0600 permissions

@HwangJohn
HwangJohn marked this pull request as ready for review July 14, 2026 12:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

OpenRouter - Allow pinning of providers of a model

1 participant