openrouter-agent-migration

Installation
SKILL.md

Migrating from @openrouter/sdk to @openrouter/agent

Agent functionality (callModel, tool(), stop conditions, format converters, streaming helpers) has moved from @openrouter/sdk to the standalone @openrouter/agent package. The @openrouter/agent package includes its own OpenRouter client class, so you do not need @openrouter/sdk for agent use cases.


When This Applies

Migrate if your code imports any of these from @openrouter/sdk:

  • callModel or uses client.callModel()
  • tool() factory function
  • Stop conditions: stepCountIs, hasToolCall, maxCost, maxTokensUsed, finishReasonIs
  • Format converters: fromClaudeMessages, toClaudeMessage, fromChatMessages, toChatMessage
  • Types: Tool, ToolWithExecute, ToolWithGenerator, ManualTool, CallModelInput, ModelResult

Quick Migration

Related skills

More from openrouterteam/skills

Installs
56
GitHub Stars
136
First Seen
Apr 5, 2026