feat(providers): add Thinking Machines (Inkling) provider

Merged
MY
3d ago
+332-1

Summary

Adds Thinking Machines as a BYOK model provider for the Agent block, using Tinker's OpenAI-compatible API (https://tinker.thinkingmachines.dev/services/tinker-prod/oai/api/v1) through the shared openai-compat chat-completions helper.

  • Catalog models thinkingmachines/inkling, inkling-small, inkling-2-small map to Tinker's Inkling, Inkling-Small, Inkling-2-Small. Pricing is included.
  • thinkingmachines/tinker://… ids are passed through as-is, so custom checkpoints work.
  • BYOK wiring: key storage, settings row, API contract, usage-page icon, and a new ThinkingMachinesIcon.
  • Attachments are disabled for this provider.
  • Docs: agent.mdx and costs.mdx.
  • Adds the live acceptance test providers/thinkingmachines/index.live.test.ts.

Product update (if relevant)

Workspaces can add their own Thinking Machines (Tinker) API key and use the Inkling models, or their own fine-tuned Tinker checkpoints, in Agent blocks.

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation
  • Other: ___________

Testing

  • bun run type-check, bun run lint (no fixes; one existing warning in an unrelated file), and bun run check:byok-providers all pass.
  • The generate:agent-stream-docs, generate:docs-manifest, and generate:tool-metadata regenerators produced no changes.
  • Unit tests beside the changed files pass: 14 files, 416 tests (providers utils/attachments/models/pricing/history-adapters/index, openai-compat, api-key byok, BYOK settings).
  • Live acceptance test against Tinker passes, 7/7: configuration, invalid credentials (401), all three catalog models, streaming, structured output, tool loop.
  • Tested by hand in the local app with a real key: all three models answer, JSON response format works, a tool call (HTTP request) works, and an invalid key returns 401.

These checks ran before the commit was rebased onto staging. The rebase had no conflicts.

Known limitation: If an Agent block sets both a Response Format and tools, the final answer after a tool call may come back as plain text instead of JSON. Tinker has no native JSON mode, so Sim asks for the format in the prompt.

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

Screenshots/Videos

šŸ¤– Generated with Claude Code