Skip to content
Twinny logo

Twinny via Tokonomix

Add Tokonomix as an openai provider in Twinny — give VS Code completion and chat 130+ models and a consensus option on one key.

openai provider (Hostname + API Path)VS Code extensionMIT · open sourceVS Code · all platforms
Twinny — VS Code code-completion and chat, via Tokonomix

What is Twinny?

Twinny is a free, open-source VS Code extension for code completion and chat. It speaks the OpenAI chat-completions spec against any host, so one Tokonomix key serves both completion and chat across 130+ models.

  • Adds AI code completion and a chat panel inside VS Code.
  • Providers are configured by Hostname, Port, Protocol, API Path and key — provider type openai.
  • Point the chat-completions API Path at /api/v1/chat/completions.
  • Open source; manage providers from the Twinny panel.

Why route Twinny through Tokonomix?

  • One key, 130+ models behind Twinny’s completion and chat.
  • Set the model to tokonomix-consensus for a cross-model check before you trust a suggestion; a direct slug for fast completion.
  • Per-call spend caps bound usage; region / origin routing keeps repo data compliant.
  • Cost is metered to the cent in your Tokonomix dashboard.

Connect Tokonomix to Twinny

In Twinny’s Manage Providers, add a provider of type openai and fill in the host, path, key and model.

// Twinny -> Manage Providers -> add provider:
// Provider type: openai
// Hostname:      tokonomix.ai
// Port:          443
// Protocol:      https
// API Path:      /api/v1/chat/completions
// API Key:       tok_live_your-key
// Model Name:    tokonomix-consensus

Verify it works

  • Add the provider in Twinny’s Manage Providers panel and select it.
  • Ask a question in the chat panel or trigger a completion.
  • Confirm the call and token usage in your Tokonomix dashboard.

Model selection

Which model and endpoint should my agent use?

Pick by what your agent does, then swap the model id any time — every model in the catalog works through the same key.

What your agent doesUse this
Edits files / calls tools and streams responses (most coding agents)An Anthropic model via the Anthropic endpoint (tools + streaming both work)
Calls tools but does not need streaming (any model)The OpenAI-compatible endpoint with a single model id
Wants tools and streaming on a non-Anthropic modelRun non-streaming for now — streaming tool-calls on other providers is not enabled yet
Plain chat, no toolsEither endpoint; streaming is fine
Wants a cross-model verdict (consensus) on a high-stakes answerSet model to tokonomix-consensus on the OpenAI-compatible endpoint — note: consensus rejects tool requests (no tool-calling)
Endpoint & API reference (technical)

anthropic-messages → https://tokonomix.ai/api/anthropic — tools ✓, streaming ✓ (use an Anthropic model). openai-completions → https://tokonomix.ai/api/v1 — tools ✓ (single-model passthrough), streaming with tools not yet enabled. Plain chat: streaming works on both. Consensus: openai-completions, model tokonomix-consensus, no tools. Swap the model id to any slug returned by GET /api/v1/models.

Browse all models →

Related agents