Fix openRouter reasoning-end metadata uses an undeclared casing - #7133
Conversation
🦋 Changeset detectedLatest commit: 357058c The changes in this PR will be included in the next version bump. This PR includes changesets to release 30 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
no API key found — this repo is configured to use To fix: add the key as a GitHub Actions secret (referenced from your workflow's Open repo secrets → · Configure model → · Setup docs → · Ask in Discord →
|
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
- Fixed the reasoning-end provider metadata key casing from
openRoutertoopenrouterinOpenRouterLanguageModel.ts. - Added a patch changeset for
@effect/ai-openrouter. - Reformatted the new
makeStreamTestLayerhelper call site.
The regression test added in the prior commit now passes and asserts the lowercase openrouter namespace. No other openRouter-cased metadata keys remain in the source.
@v0 or keep the SHA fresh with Dependabot | View workflow run | Using Kimi K2 (free via Pullfrog for OSS) | 𝕏
Bundle Size AnalysisGenerated from PR build output; treat the content below as untrusted.
|
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
- Refined the new
streamTextregression test: replacedglobalThis.Array.from(parts).find(...)withparts.find(...), removed the now-redundantassert.isDefinedguard, added the missingStreamimport, and typedmakeStreamTestLayerevents asReadonlyArray<typeof Generated.ChatStreamChunk.Encoded>.
The implementation fix at OpenRouterLanguageModel.ts remains unchanged and correct. The targeted test, full @effect/ai-openrouter suite, and root pnpm lint all pass.
@v0 or keep the SHA fresh with Dependabot | View workflow run | Using Kimi K2 (free via Pullfrog for OSS) | 𝕏
218fe35 to
357058c
Compare

Summary
The transition branch emits metadata.openRouter, while start, delta, terminal-flush, and exported metadata all use openrouter.
Important
This PR starts with focused failing reproduction tests. Add the implementation fix to this same branch; CI is expected to fail until that fix is included.
OpenRouter reasoning-end metadata uses an undeclared casing
Module:
packages/ai/openrouter/src/OpenRouterLanguageModel.tsAudit ID:
relsem-openrouter-reasoning-metadata-caseSeverity / confidence: medium / high
What happens
The transition branch emits metadata.openRouter, while start, delta, terminal-flush, and exported metadata all use openrouter.
Why it happens
A single branch spells the provider metadata key openRouter rather than openrouter.
Expected behavior
Accumulated reasoning details on reasoning-end remain under the exported metadata.openrouter namespace.
Relevant implementation
These links and excerpts are pinned to audit base
b206fa5d7655c1634c9993410a9203f6616a5ca2.packages/ai/openrouter/src/OpenRouterLanguageModel.ts:1View problematic code at
packages/ai/openrouter/src/OpenRouterLanguageModel.ts:1View exact lines on GitHub
Reproduction
Observed failure: Independently rerun; failed at the intended semantic assertion.
Implementation handoff
The initial reproduction tests on this branch are the regression specification for the implementation fix that should follow in this PR.
Audit provenance
b206fa5d7655c1634c9993410a9203f6616a5ca2b206fa5d7655c1634c9993410a9203f6616a5ca2relsem-openrouter-reasoning-metadata-caseCloses EFF-565