SDK Parity Hardening — 4 resources, 15 methods, 8 MCP tools
2026-03-09
What We Built
Closed all 8 P1 items from the Gap Ledger (GAP-001 through GAP-008) by adding Config, Insights, Capacity, and Aliases resources to both the TypeScript and Python SDKs. Each resource wraps existing API routes that previously had no SDK coverage, meaning users had to construct raw HTTP requests to access configuration management, cost intelligence, capacity planning, and alias routing.
Additionally added 8 new MCP tools so AI agents can read and write tenant config, query daily cost breakdowns, run budget forecasts, check provider capacity, and manage model aliases — all through the standard MCP protocol.
Why It Matters
SDK parity is a trust signal. When a developer discovers that /v1/config works via curl but not via client.config.get(), they question what else is missing. These 4 resources represent the operational backbone — configuration, cost visibility, capacity planning, and routing shortcuts. Without SDK coverage, programmatic fleet management requires raw HTTP, which breaks the "drop-in replacement" promise.
For AI agents, the 6 new MCP tools mean an agent can now self-manage its configuration, monitor its cost trajectory, and check whether its provider has capacity before making expensive calls.
How It Works
Both SDKs follow identical patterns. TypeScript uses the Resource base class with typed returns:
import BrainstormRouter from "brainstormrouter";
const client = new BrainstormRouter({ apiKey: "br_live_..." });
const config = await client.config.get("guardrails");
const daily = await client.insights.daily();
const capacity = await client.capacity.forecast();
await client.aliases.set({ fast: "anthropic/claude-haiku-4-5" });
Python provides sync and async variants:
from brainstormrouter import BrainstormRouter
client = BrainstormRouter(api_key="br_live_...")
config = client.config.get("guardrails")
daily = client.insights.daily()
forecast = client.insights.forecast(budget=100.0, period="monthly")
client.aliases.patch({"fast": None, "budget": "openai/gpt-4o-mini"})
The Numbers
- 4 new SDK resources (Config, Insights, Capacity, Aliases)
- 15 new SDK methods across both languages (6 + 4 + 2 + 3)
- 8 new MCP tools for agent self-management
- 8 Gap Ledger items closed (GAP-001 through GAP-008)
- 38 total MCP tools (up from 30)
Competitive Edge
Portkey and OpenRouter expose configuration and insights only through their dashboards. BrainstormRouter makes these capabilities programmable via typed SDKs and machine-accessible via MCP. An AI agent on BrainstormRouter can read its own cost trajectory, adjust its routing aliases, and check provider capacity — no human dashboard required.
Lockstep Checklist
- [x] API Routes: MCP discovery updated (
mcp-server.ts), 6 MCP deps with RBAC guards (server.ts). - [x] TS SDK:
packages/sdk-ts— 4 resources added, tested, types exported. - [x] Python SDK:
packages/sdk-py— 4 resources added (sync + async), tested. - [x] MCP Schemas: 6 tools added to
server.ts,tool-manifest.ts, andagents.json. - [ ] Master Record:
docs/architecture/master-capability-record.md— defer to next capability audit.