Skip to content

chore: version packages - #119

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

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 25, 2026 •

Copy link
Copy Markdown
Contributor

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@1.0.0

Major Changes

  • #110 9766f31 Thanks @LukasParke! - Stop accumulating generator-tool preliminaryResults arrays. Yields are still broadcast live; the terminal tool.result event and ToolExecutionResult no longer carry the full yield history.

Minor Changes

  • #118 4dce84e Thanks @sambarnes! - Allow manual tools to provide a caller-owned JSON Schema for wire serialization.

    import { tool } from "@openrouter/agent";
    import { z } from "zod";
    
    const confirmTool = tool({
      name: "confirm_action",
      inputSchema: z.object({ action: z.string() }),
      wireInputSchema: {
        type: "object",
        properties: {
          action: { type: "string" },
        },
        required: ["action"],
      },
      execute: false,
    });
  • #93 dacf4d1 Thanks @LukasParke! - Fix fromChatMessages dropping assistant tool calls and give both message converters precise array return types that work with callModel, Item[], and the SDK's InputsUnion.

    Assistant toolCalls now become function_call items, preserving their already-serialized arguments. A message containing both text and tool calls emits both items; an empty assistant message is omitted only when tool calls replace it.

    import {
      callModel,
      fromChatMessages,
      type ChatMessages,
      type Item,
    } from "@openrouter/agent";
    
    const messages: ChatMessages[] = [
      {
        role: "assistant",
        content: null,
        toolCalls: [
          {
            id: "call_1",
            type: "function",
            function: { name: "get_weather", arguments: '{"city":"Austin"}' },
          },
        ],
      },
    ];
    
    const input: Item[] = fromChatMessages(messages);
    const result = callModel(client, { model: "openai/gpt-4o-mini", input });

Patch Changes

  • #120 ddab365 Thanks @LukasParke! - Identify Agent SDK requests with an Agent SDK user-agent suffix that includes the package version.

    import { OpenRouter } from "@openrouter/agent";
    
    const client = new OpenRouter({ apiKey: process.env.OPENROUTER_API_KEY });
    // Requests use the Agent SDK user agent by default.
    // Pass userAgent to override the default identification.
  • #125 ddd60df Thanks @w0nche0l! - Do not execute tool calls from a response truncated at max_output_tokens. A turn that hits the token budget mid-tool-call now finalizes with status: 'incomplete' instead of running the cut-off call (and re-requesting on the same exhausted budget).

    import { callModel } from "@openrouter/agent";
    
    const result = callModel(client, {
      model: "anthropic/claude-sonnet-4.5",
      maxOutputTokens: 512, // budget exhausted mid tool call
      tools: [myTool],
    });
    const response = await result.getResponse();
    // response.status === 'incomplete'
    // response.incompleteDetails.reason === 'max_output_tokens'
    // The cut-off call is NOT executed; raise the budget and re-request.

@openrouter/mcp@1.1.2

Patch Changes

@openrouter-port-bot
openrouter-port-bot Bot force-pushed the changeset-release/main branch 2 times, most recently from 338285d to f85219c Compare August 26, 2026 20:10

This branch has not been deployed

No deployments
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