Skip to content

chore: version packages - #108

Open
openrouter-port-bot[bot] wants to merge 1 commit into
mainfrom
changeset-release/main
Open

chore: version packages#108
openrouter-port-bot[bot] wants to merge 1 commit into
mainfrom
changeset-release/main

Conversation

@openrouter-port-bot

@openrouter-port-bot openrouter-port-bot Bot commented Aug 12, 2026

Copy link
Copy Markdown

This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.

Releases

@openrouter/agent@0.10.0

Minor Changes

  • #102 787cbf8 Thanks @LukasParke! - Add the full MCP integration under the canonical @openrouter/agent/mcp subpath. @modelcontextprotocol/client 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.

    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,
    });

    Install @modelcontextprotocol/client 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.

    The @openrouter/mcp facade continues to install @modelcontextprotocol/client transitively for backward compatibility; only direct @openrouter/agent/mcp users need to add the optional peer explicitly.

  • #31 8d2ed61 Thanks @mattapperson! - Add @openrouter/agent/tool-set (port of ai-tool-set v1.0.0, MIT © Chris Cook): declarative activate / deactivate / activateWhen / deactivateWhen for tools with state- and context-aware predicates. Integrates with a new activeTools?: readonly string[] option on callModel that filters which tools are sent to the model for a given call.

    import { callModel, OpenRouter, serverTool, tool } from "@openrouter/agent";
    import { createToolSet } from "@openrouter/agent/tool-set";
    import { z } from "zod/v4";
    
    type AppContext = { accountId: string };
    
    // Curried form preserves the literal name for correlated tool event types.
    const listOrders = tool<AppContext>()({
      name: "list_orders",
      inputSchema: z.object({}),
      execute: async (_params, ctx) => ({
        accountId: ctx?.shared.accountId,
        orders: [],
      }),
    });
    // override the default `server:${type}` id
    const search = serverTool(
      { type: "web_search_2025_08_26" },
      { id: "public_search" }
    );
    
    const toolSet = createToolSet({
      tools: [listOrders, search] as const,
    }).deactivate("list_orders");
    
    const client = new OpenRouter({ apiKey: process.env["OPENROUTER_API_KEY"] });
    const resolved = toolSet.resolve();
    
    // resolved.callModel is `{ tools, activeTools }` — spread it straight in
    const result = callModel(client, {
      model: "openai/gpt-4o-mini",
      input: "Search for OpenRouter pricing.",
      ...resolved.callModel,
    });

@openrouter/mcp@1.1.0

Minor Changes

  • #102 787cbf8 Thanks @LukasParke! - Add the full MCP integration under the canonical @openrouter/agent/mcp subpath. @modelcontextprotocol/client 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.

    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,
    });

    Install @modelcontextprotocol/client 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.

    The @openrouter/mcp facade continues to install @modelcontextprotocol/client transitively for backward compatibility; only direct @openrouter/agent/mcp users need to add the optional peer explicitly.

Patch Changes

@openrouter-port-bot
openrouter-port-bot Bot force-pushed the changeset-release/main branch from fdcb343 to 8c22c42 Compare August 12, 2026 02:19
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.

0 participants