Skip to content

chore(agent): upgrade @openrouter/sdk to 1.5.85 - #158

Merged
mattapperson merged 2 commits into
mainfrom
chore/openrouter-sdk-1-5
Nov 11, 2026
Merged

mattapperson merged 2 commits into
mainfrom
chore/openrouter-sdk-1-5

Conversation

@mattapperson

@mattapperson mattapperson commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Upgrades @openrouter/sdk in @openrouter/agent from ^0.13.7 to ^1.5.85 (latest on npm). This is a major-version jump, so it needs a few code changes beyond the version bump.

Changes

  • Input item typing. The SDK's BaseInputsUnion used to include any, and the agent used it to mean "a single input item". It is now strict and only describes instructions. Those uses are retyped to the SDK's InputsUnion1, which is also re-exported from the package index.
  • Output fed back as input. The SDK types response output and request input separately. turn-context.ts gains an isInputItem typeguard and an outputToInputItems helper, which replace five as casts in model-result.ts and resume-tool-results.ts.
  • Renamed export. OutputImage is now CodeInterpreterImageOutput in the SDK. The new name is exported, and OutputImage / OutputInputImage remain as aliases.
  • Hook tests. The new SDK pre-registers its own SignalTimeoutHook on every SDKHooks instance. Four tests in openrouter.test.ts that asserted exactly one hook now assert the user's hook is present.

Reviewer notes

  • The changeset is a minor bump. Public signatures such as appendToMessages and normalizeInputToArray moved from an any-typed item to a strict one, so some consumers could see new type errors.
  • outputToInputItems keeps any object with a string type or role, so the items sent on the next turn are the same as before the upgrade.

Testing

  • pnpm lint, pnpm typecheck, pnpm build, pnpm verify:packages pass
  • pnpm test: agent 109 files, mcp 5 files pass
  • pnpm test:e2e against the live API: 18 files pass, 1 skipped

Devin Review

The SDK moved from 0.13.7 to 1.5.85. BaseInputsUnion no longer includes
any, so single input items are typed as InputsUnion1 and response output
crosses into request input through a typeguard instead of casts. The
code-interpreter image type was renamed to CodeInterpreterImageOutput;
OutputImage and OutputInputImage stay as aliases.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

Import outputToInputItems through conversation-state's existing
re-export instead of adding a direct edge to turn-context.
@mattapperson
mattapperson merged commit 2d5c182 into main Nov 11, 2026
8 checks passed
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.

2 participants