Repository navigation
SEC-768: refactor: remove the old callModel code that moved to @openrouter/agent - #1356
Merged
LukasParke merged 3 commits intoNov 5, 2026
Merged
Conversation
…of an approval-gated call Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Contributor
|
I'll fix CI failures and address comments from users with write access that start with 'Devin'.
|
talos
approved these changes
Nov 5, 2026
…768-stopwhen-before-approval
LukasParke
deleted the
devin/1793837540-sec-768-stopwhen-before-approval
branch
November 5, 2026 17:38
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
SEC-768 (
stopWhenchecked after auto-approved siblings of an approval-gated call ran) is in the SDK's old copy ofcallModel.callModeland its tool system moved to@openrouter/agent(see the README's migration note), and the copy here is not exported from the package entry points. So this PR deletes that code instead of fixing it. The agent-side fix is OpenRouterTeam/typescript-agent#143.Removed:
src/funcs/call-model.tsand the 19 hand-writtensrc/lib/files that only it used:model-result,tool,tool-types,tool-executor,tool-orchestrator,tool-context,tool-event-broadcaster,conversation-state,stop-conditions,next-turn-params,async-params,turn-context,reusable-stream,stream-transformers,stream-type-guards,anthropic-compat,chat-compat,claude-type-guards,claude-constants. No generated file imports any of them.OpenRouter#callModelmethod and theToolTypere-export in the custom regions ofsrc/sdk/sdk.ts.callModelarchitecture section fromCLAUDE.md.Breaking-change note:
OpenRouter#callModelandToolTypewere still on the class and in the 1.5.56 typings.Tool,tool(), stop conditions andModelResultwere not exported from any entry point. Anyone who still callsclient.callModel()must move to@openrouter/agent.Testing
pnpm run lint,pnpm run typecheck,pnpm run buildpass.esm/sdk/sdk.d.tsno longer mentionscallModel.pnpm test: 7 files, 65 tests pass.validatehas been failing on the live-API e2e testtests/e2e/image-generation.test.ts. The same failure shows up on other open PRs, so this change didn't cause it.Fixes SEC-768
Link to Devin session: https://openrouter.devinenterprise.com/sessions/c1a6389d6666493e86069406d08ef2ef
Open in Devin Desktop: https://openrouter.devinenterprise.com/desktop/session/c1a6389d6666493e86069406d08ef2ef?variant=devin
Requested by: @alexb-openrouter