-
Notifications
You must be signed in to change notification settings - Fork 12
refactor(agent): nest tool-set and MCP under agent subpaths #102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| --- | ||
| "@openrouter/agent": minor | ||
| "@openrouter/mcp": minor | ||
| --- | ||
|
|
||
| Add the full MCP integration under the canonical `@openrouter/agent/mcp` subpath. `@modelcontextprotocol/sdk` is an optional peer, so base agent installations and imports do not install or load MCP support. The existing `@openrouter/mcp` package remains as a compatibility facade and now re-exports the canonical agent subpaths. | ||
|
|
||
| ```ts | ||
| import { callModel, OpenRouter } from '@openrouter/agent'; | ||
| import { createMCPTools } from '@openrouter/agent/mcp'; | ||
|
|
||
| const mcp = await createMCPTools({ url: 'https://mcp.example.com/mcp' }); | ||
| const result = callModel(new OpenRouter(), { | ||
| model: 'openai/gpt-4o-mini', | ||
| input: 'Use the remote tools.', | ||
| tools: mcp.tools, | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🔴 Blocker — changeset directs users to the wrong package. This line tells users to install Update both references in this changeset (line 7 and line 16) to ▶ Prompt for agents: In |
||
| }); | ||
| ``` | ||
|
|
||
| Install `@modelcontextprotocol/sdk` alongside `@openrouter/agent` when using `/mcp`. The SDK is loaded lazily, so importing the base agent or the MCP entry point does not require the peer; the first MCP connection attempt without it throws an actionable `MCPMissingPeerDependencyError`. | ||
|
|
||
| Existing `@openrouter/mcp` imports continue to work as tooling-visible deprecated migration facades, but new code should prefer `@openrouter/agent/mcp`. The facade would only be removed in a future breaking release after migration notice. | ||
This file was deleted.
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🟡 Release notes declare a compatible update even though public entry points are removed
The release note marks both packages as a backward-compatible feature release (
"@openrouter/agent": minorat.changeset/agent-mcp-subpath.md:1-4) while the change deletes published entry points and exported error types.Impact: Consumers get a breaking change delivered as a routine minor upgrade, with no migration guidance in the changelog.
Repository bump-type rule
.agents/skills/changeset-versioning/SKILL.mdstates: "major — Breaking API changes (e.g. changingcallModelsignature, removing exports)". This PR removes six subpath exports frompackages/agent/package.json(see the./tool-concurrency,./tool-task,./agent-tool, … entries) and removesMCPCacheWriteError,MCPStaleSnapshotError,MCPOAuthClientProvider,MCPProtocolNegotiation, andMCPProtocolRevisionfrom the@openrouter/mcpsurface, so amajorbump (or restoration of those exports — see the other findings) is required.Was this helpful? React with 👍 or 👎 to provide feedback.