From 41931d19e34fa46a0eb2284d4c7d3c518b06bfb3 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 22 Sep 2026 05:03:26 +0000 Subject: [PATCH] chore: version packages --- .changeset/bright-tools-wire-schema.md | 23 ------ .changeset/drop-preliminary-results.md | 5 -- .changeset/from-chat-messages-tool-calls.md | 28 ------- .changeset/tidy-agents-smile.md | 13 ---- .changeset/truncated-tool-calls-guard.md | 19 ----- packages/agent/CHANGELOG.md | 86 +++++++++++++++++++++ packages/agent/package.json | 2 +- packages/agent/src/mcp/version.ts | 2 +- packages/mcp/CHANGELOG.md | 7 ++ packages/mcp/package.json | 2 +- 10 files changed, 96 insertions(+), 91 deletions(-) delete mode 100644 .changeset/bright-tools-wire-schema.md delete mode 100644 .changeset/drop-preliminary-results.md delete mode 100644 .changeset/from-chat-messages-tool-calls.md delete mode 100644 .changeset/tidy-agents-smile.md delete mode 100644 .changeset/truncated-tool-calls-guard.md diff --git a/.changeset/bright-tools-wire-schema.md b/.changeset/bright-tools-wire-schema.md deleted file mode 100644 index c6c4c122..00000000 --- a/.changeset/bright-tools-wire-schema.md +++ /dev/null @@ -1,23 +0,0 @@ ---- -'@openrouter/agent': minor ---- - -Allow manual tools to provide a caller-owned JSON Schema for wire serialization. - -```ts -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, -}); -``` diff --git a/.changeset/drop-preliminary-results.md b/.changeset/drop-preliminary-results.md deleted file mode 100644 index 0b166094..00000000 --- a/.changeset/drop-preliminary-results.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@openrouter/agent': major ---- - -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. diff --git a/.changeset/from-chat-messages-tool-calls.md b/.changeset/from-chat-messages-tool-calls.md deleted file mode 100644 index a102cbc7..00000000 --- a/.changeset/from-chat-messages-tool-calls.md +++ /dev/null @@ -1,28 +0,0 @@ ---- -'@openrouter/agent': minor ---- - -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. - -```ts -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 }); -``` diff --git a/.changeset/tidy-agents-smile.md b/.changeset/tidy-agents-smile.md deleted file mode 100644 index 7c441799..00000000 --- a/.changeset/tidy-agents-smile.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -'@openrouter/agent': patch ---- - -Identify Agent SDK requests with an Agent SDK user-agent suffix that includes the package version. - -```ts -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. -``` diff --git a/.changeset/truncated-tool-calls-guard.md b/.changeset/truncated-tool-calls-guard.md deleted file mode 100644 index 91bafea3..00000000 --- a/.changeset/truncated-tool-calls-guard.md +++ /dev/null @@ -1,19 +0,0 @@ ---- -'@openrouter/agent': patch ---- - -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). - -```ts -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. -``` diff --git a/packages/agent/CHANGELOG.md b/packages/agent/CHANGELOG.md index d5e50ffd..4dc84373 100644 --- a/packages/agent/CHANGELOG.md +++ b/packages/agent/CHANGELOG.md @@ -1,5 +1,91 @@ # @openrouter/agent +## 1.0.0 + +### Major Changes + +- [#110](https://github.com/OpenRouterTeam/typescript-agent/pull/110) [`9766f31`](https://github.com/OpenRouterTeam/typescript-agent/commit/9766f31ec2390cd294ca47dd81d0122941c0d586) Thanks [@LukasParke](https://github.com/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](https://github.com/OpenRouterTeam/typescript-agent/pull/118) [`4dce84e`](https://github.com/OpenRouterTeam/typescript-agent/commit/4dce84e4393ec36745875512d6ad1fcd8b38e502) Thanks [@sambarnes](https://github.com/sambarnes)! - Allow manual tools to provide a caller-owned JSON Schema for wire serialization. + + ```ts + 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](https://github.com/OpenRouterTeam/typescript-agent/pull/93) [`dacf4d1`](https://github.com/OpenRouterTeam/typescript-agent/commit/dacf4d166a8ece1c2aff77727e2db1da5417391b) Thanks [@LukasParke](https://github.com/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. + + ```ts + 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](https://github.com/OpenRouterTeam/typescript-agent/pull/120) [`ddab365`](https://github.com/OpenRouterTeam/typescript-agent/commit/ddab3652a47edf5ebaa842447864a3dc91b812e5) Thanks [@LukasParke](https://github.com/LukasParke)! - Identify Agent SDK requests with an Agent SDK user-agent suffix that includes the package version. + + ```ts + 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](https://github.com/OpenRouterTeam/typescript-agent/pull/125) [`ddd60df`](https://github.com/OpenRouterTeam/typescript-agent/commit/ddd60dffab8018363dc42ad20ebf2d57e33c2809) Thanks [@w0nche0l](https://github.com/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). + + ```ts + 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. + ``` + ## 0.11.0 ### Minor Changes diff --git a/packages/agent/package.json b/packages/agent/package.json index 12ec2d2c..ee01c4c6 100644 --- a/packages/agent/package.json +++ b/packages/agent/package.json @@ -1,6 +1,6 @@ { "name": "@openrouter/agent", - "version": "0.11.0", + "version": "1.0.0", "author": "OpenRouter", "description": "Agent toolkit for building AI applications with OpenRouter — tool orchestration, streaming, multi-turn conversations, and format compatibility.", "keywords": [ diff --git a/packages/agent/src/mcp/version.ts b/packages/agent/src/mcp/version.ts index 5c8d431c..07e3ac81 100644 --- a/packages/agent/src/mcp/version.ts +++ b/packages/agent/src/mcp/version.ts @@ -2,4 +2,4 @@ // Run `pnpm --filter @openrouter/agent gen:version` after bumping the version. /** This package's version, self-reported to MCP servers as `clientInfo`. */ -export const PACKAGE_VERSION = '0.11.0'; +export const PACKAGE_VERSION = '1.0.0'; diff --git a/packages/mcp/CHANGELOG.md b/packages/mcp/CHANGELOG.md index ddb9756c..dfe3854e 100644 --- a/packages/mcp/CHANGELOG.md +++ b/packages/mcp/CHANGELOG.md @@ -1,5 +1,12 @@ # @openrouter/mcp +## 1.1.2 + +### Patch Changes + +- Updated dependencies [[`4dce84e`](https://github.com/OpenRouterTeam/typescript-agent/commit/4dce84e4393ec36745875512d6ad1fcd8b38e502), [`9766f31`](https://github.com/OpenRouterTeam/typescript-agent/commit/9766f31ec2390cd294ca47dd81d0122941c0d586), [`dacf4d1`](https://github.com/OpenRouterTeam/typescript-agent/commit/dacf4d166a8ece1c2aff77727e2db1da5417391b), [`ddab365`](https://github.com/OpenRouterTeam/typescript-agent/commit/ddab3652a47edf5ebaa842447864a3dc91b812e5), [`ddd60df`](https://github.com/OpenRouterTeam/typescript-agent/commit/ddd60dffab8018363dc42ad20ebf2d57e33c2809)]: + - @openrouter/agent@1.0.0 + ## 1.1.1 ### Patch Changes diff --git a/packages/mcp/package.json b/packages/mcp/package.json index fa99e33b..09ea25fb 100644 --- a/packages/mcp/package.json +++ b/packages/mcp/package.json @@ -1,6 +1,6 @@ { "name": "@openrouter/mcp", - "version": "1.1.1", + "version": "1.1.2", "engines": { "node": ">=20" },