diff --git a/blog/asset-sources/route-cursor-through-token-station-grok-4-6-cover.svg b/blog/asset-sources/route-cursor-through-token-station-grok-4-6-cover.svg new file mode 100644 index 0000000..2c5acfa --- /dev/null +++ b/blog/asset-sources/route-cursor-through-token-station-grok-4-6-cover.svg @@ -0,0 +1,63 @@ + + route-cursor-through-token-station-grok-4-6-cover + + + + + + + + + + + + + + + + + + + + + + CURSOR · TOKEN STATION · GROK 4.6 + + Grok 4.6, + wired in. + Confirmed: Agent-mode file edits. + + + + + OVERRIDE OPENAI BASE URL + + https://models.bytefuture.ai/v1 + + CUSTOM MODEL ADDED + + + + + xai/grok-4.6 + + + + Cursor + + + Token Station + + + Agent mode ✓ + + + + + + + + ByteFuture + diff --git a/blog/route-cursor-through-token-station-grok-4-6-cover.png b/blog/route-cursor-through-token-station-grok-4-6-cover.png new file mode 100644 index 0000000..2ddb487 Binary files /dev/null and b/blog/route-cursor-through-token-station-grok-4-6-cover.png differ diff --git a/blog/route-cursor-through-token-station/grok-agent-mode-edit.mp4 b/blog/route-cursor-through-token-station/grok-agent-mode-edit.mp4 new file mode 100644 index 0000000..29ea46f Binary files /dev/null and b/blog/route-cursor-through-token-station/grok-agent-mode-edit.mp4 differ diff --git a/blog/route-cursor-through-token-station/grok-dashboard-activity.jpg b/blog/route-cursor-through-token-station/grok-dashboard-activity.jpg new file mode 100644 index 0000000..3254d5d Binary files /dev/null and b/blog/route-cursor-through-token-station/grok-dashboard-activity.jpg differ diff --git a/sitemap.xml b/sitemap.xml index 2bcb1fd..be849c2 100644 --- a/sitemap.xml +++ b/sitemap.xml @@ -307,22 +307,42 @@ https://bytefuture.ai/blog/route-cursor-through-token-station.html - 2026-08-18 + 2026-08-26 0.7 https://bytefuture.ai/blog/route-cursor-through-token-station-zh.html - 2026-08-18 + 2026-08-26 0.6 https://bytefuture.ai/blog/route-cursor-through-token-station-ja.html - 2026-08-18 + 2026-08-26 0.6 https://bytefuture.ai/blog/route-cursor-through-token-station-ko.html - 2026-08-18 + 2026-08-26 + 0.6 + + + https://bytefuture.ai/blog/route-cursor-through-token-station-grok-4-6.html + 2026-08-26 + 0.7 + + + https://bytefuture.ai/blog/route-cursor-through-token-station-grok-4-6-zh.html + 2026-08-26 + 0.6 + + + https://bytefuture.ai/blog/route-cursor-through-token-station-grok-4-6-ja.html + 2026-08-26 + 0.6 + + + https://bytefuture.ai/blog/route-cursor-through-token-station-grok-4-6-ko.html + 2026-08-26 0.6 diff --git a/src/content/writings/en/route-cursor-through-token-station-grok-4-6.md b/src/content/writings/en/route-cursor-through-token-station-grok-4-6.md new file mode 100644 index 0000000..de1d298 --- /dev/null +++ b/src/content/writings/en/route-cursor-through-token-station-grok-4-6.md @@ -0,0 +1,152 @@ +--- +slug: "route-cursor-through-token-station-grok-4-6" +lang: "en" +title: "Route Cursor through Token Station: Grok 4.6" +summary: "Cursor supports custom OpenAI-compatible providers through Settings, Models. Point it at Token Station and xAI's Grok 4.6 shows up as a selectable model, billed through your own key, with confirmed Agent-mode file edits. A companion to the Claude Sonnet 5 and Haiku setup, covering what's different for Grok." +category: "tutorial" +date: "2026-08-26" +cta: "https://models.bytefuture.ai/intro.html" +cover: "blog/route-cursor-through-token-station-grok-4-6-cover.png" +draft: false +--- + +Cursor supports custom OpenAI-compatible providers through Settings → Models. Point it at Token Station's endpoint and you can add xAI's Grok 4.6 as a selectable model, billed through your own Token Station key. This is a companion to our [Claude Sonnet 5 and Haiku setup](/blog/route-cursor-through-token-station.html): registering the provider and defining subagents work exactly the same way regardless of which model you add, so this piece stays short and points back to that one for the deeper investigative detail (a subagent-naming collision with one of Cursor's own built-in agents, and a Cursor platform bug that keeps subagents from actually running on a different model than the parent conversation). What's specific to Grok is Step 2 and the note on Agent mode below. + +Before the setup, it's worth being explicit about why to route Cursor through Token Station at all, rather than paying Cursor directly. Three concrete reasons stand out. Cursor's Pro plan bundles a handful of models (Grok 4.6, Grok 4.5, Composer 2.5) into a shared monthly usage pool and meters everything else from a separate pool at each model's own API price, but neither pool gives you a per-model, per-request breakdown of what you actually spent. A Token Station key sidesteps both: BYOK requests go straight to Token Station's endpoint, never touch Cursor's own billing, and land on your own dashboard priced at the provider's real rate, with zero markup. Second, if Cursor is one of several coding tools you use (alongside Claude Code, Codex, or OpenClaw, say), the same Token Station key and the same model IDs work in all of them: one account and one balance to track, instead of separate keys, separate top-ups, and separate invoices per tool. Third, Token Station's catalog runs past 300 models across 30+ providers, well beyond whatever Cursor happens to bundle into its own pools. + +One Grok-specific wrinkle worth flagging up front: Cursor's own Pro plan already bundles Grok 4.6 into its native "Cursor Models" pool, at Cursor's own usage-pool pricing. Routing Grok 4.6 through Token Station instead means you're paying xAI's API rate directly, with the cost-visibility and consolidation benefits above, rather than drawing down Cursor's bundled allocation. + +## What you need before starting + +- Cursor installed ([cursor.com/download](https://cursor.com/download)). +- A Token Station account and API key. Sign up free at [models.bytefuture.ai](https://models.bytefuture.ai): $1 in credit on registration, no card required. +- Cursor Pro. Custom-model selection in Agent mode is gated on the Free plan, even with your own API key, so you'll need Pro ($20/month) for anything past Chat mode. + +## Step 1: Register Token Station as a custom provider + +Open **Settings → Cursor Settings → Models**, scroll to **API Keys**, and set two fields: + +- **OpenAI API Key**: your Token Station key. +- **Override OpenAI Base URL**: toggle it on, and replace the default with `https://models.bytefuture.ai/v1`. + +This step doesn't depend on which model you're about to add, so here's the same recording from the companion article: + +
+ +
Registering Token Station as a custom OpenAI-compatible provider in Cursor's Models settings.
+
+ +Don't rely on a "Verify" button to confirm the key and URL are correct. It isn't always present, and even when it is, it doesn't cover every path. The reliable check is Step 2: add the model and actually send it a message. + +## Step 2: Add Grok 4.6 as a custom model + +Still in Models settings, click **+ Add Custom Model** and add: + +``` +xai/grok-4.6 +``` + +**Same naming gotcha as the Claude setup**: Cursor sends whatever name you register here verbatim as the `model` field in its request, and Token Station's actual route name includes the `xai/` prefix. Register plain `grok-4.6` and requests fail with `Model 'grok-4.6' not found`. Register it with the prefix and it works immediately. + +To confirm it's actually working end to end, not just accepted by Cursor: open a chat, select Grok 4.6, send a trivial message, and check the [Token Station dashboard](https://models.bytefuture.ai/dashboard). A real reply plus a matching line in Recent Activity means the key, base URL, and model name are all correct. + +
+ Token Station dashboard Recent Activity showing an xai/grok-4.6 request billed at $0.01 +
A real request through Cursor, billed to the Token Station key and showing up as xai/grok-4.6 in Recent Activity.
+
+ +| Model | Good for | +|---|---| +| `xai/grok-4.6` | Main coding model: planning, implementation, chat, and confirmed Agent-mode file edits (see below). | + +Agent-mode file editing works with Grok 4.6 through Token Station, real edits applied to real files, not just chat: + +
+ +
Grok 4.6, routed through Token Station, editing a file directly in Cursor's Agent mode.
+
+ +## Step 3: Define scoped subagents + +Same two subagents as the companion article, a read-only researcher and a test verifier, work the same way here. Full detail on why the `model:` field doesn't actually route a subagent to a different model, and why we settled on these specific names, is in the [Claude Sonnet 5 and Haiku article](/blog/route-cursor-through-token-station.html#step-3-define-scoped-subagents); this is the short version. + +**`.cursor/agents/bill-the-explorer.md`** +```markdown +--- +name: bill-the-explorer +description: Searches and reads the codebase to answer questions about existing code. Use proactively before implementing anything unfamiliar. +model: inherit +readonly: true +--- + +You are a fast, read-only research agent. Find and summarize relevant +files, functions, and patterns. Never edit files or run mutating commands. +``` + +**`.cursor/agents/jill-the-test-runner.md`** +```markdown +--- +name: jill-the-test-runner +description: Runs the test suite and reports pass/fail results with failure details. Use proactively after any code change. +model: inherit +--- + +You run the project's test command, capture output, and report which +tests passed or failed and why. Do not modify source files. +``` + +We're using `model: inherit` explicitly here rather than naming a specific model, since Cursor's Task tool doesn't currently honor a custom model for subagents regardless of what's specified, they always run on whichever model the parent conversation is using (Grok 4.6, in this setup). `inherit` says so plainly instead of implying a cost tier that isn't actually there yet. + +Creating these subagents is identical to the companion article's process, so here's that same recording: + +
+ +
Creating the bill-the-explorer and jill-the-test-runner subagents.
+
+ +Also worth repeating from the companion piece: avoid naming a subagent something that collides with one of Cursor's own built-in agents. `explore` is a real built-in name and gets silently misrouted there instead of your own definition, with no error to explain why. `bill-the-explorer` and `jill-the-test-runner` avoid that. + +## Try it yourself: the same httpie task + +We ran a full coding session with Claude Sonnet 5, delegating research and verification to these two subagents, against a real feature in [httpie](https://github.com/httpie/httpie): adding the effective URL (the URL actually reached after following any redirects) to httpie's `--meta` output, next to the existing elapsed time. That session and the recording are in the companion article. + +We haven't yet run that specific multi-step session, with subagent delegation, against Grok 4.6, so this section is still a "try it yourself" rather than a report on what happened for this exact task. What is now confirmed, shown above, is that Grok 4.6 can apply real Agent-mode file edits through Token Station, so there's no longer a fundamental reason to expect the full task to fail. Explicit invocation was the reliable way to trigger subagent delegation with Sonnet 5; plain prose asking it to "use the explore subagent" didn't actually hand off. The same three-message sequence, unchanged, is worth trying with Grok 4.6 selected: + +**Message 1**, to delegate research: +``` +/bill-the-explorer find how elapsed time is computed and displayed in HTTPie's --meta output, and identify where to add the effective URL, the URL actually reached after following any redirects, alongside it. +``` + +**Message 2**, back to the main agent, once research comes back: +``` +Using what bill-the-explorer found, add the effective URL next to the existing elapsed time in HTTPie's --meta output. Add a test that confirms it works for both a redirected and a non-redirected request. +``` + +**Message 3**, to delegate verification: +``` +/jill-the-test-runner verify the new effective-URL test passes, along with the rest of the test suite. Report any failures separately from the two known pre-existing Big5 charset-detection failures in tests/test_encoding.py, which are unrelated to this change. +``` + +Single-step Agent-mode edits are already confirmed; what this specific sequence tests is whether the full research-implement-verify workflow, with real subagent delegation, holds up across a multi-step session the same way it did with Claude Sonnet 5. + +## What works today + +Chat and Agent mode both work with Grok 4.6 through Token Station in Cursor: real replies, real file edits, correctly billed to your Token Station key, visible on the dashboard. Registering the provider and defining subagents are mechanically identical to the Claude setup, since none of that depends on which model you add. + +That puts Grok 4.6 alongside Claude Sonnet 5 as a route that reliably drives Agent-mode edits through Token Station, not a given for every model family: Token Station's GPT-5.6 routes (Sol, Terra, Luna) could read and discuss code in Agent mode in earlier testing but consistently failed to apply file edits, a tool-call response format gap on Token Station's side rather than a hard Cursor limitation, with support in progress. Tool-calling compatibility turned out to be genuinely model- and provider-specific, so Grok's confirmed here on its own evidence rather than assumed by analogy with Claude. + +What's still untested specifically is the full multi-step session, research delegation, implementation, and verification delegation, against a real task with Grok 4.6 as the main model. The single-edit capability behind it is confirmed; the end-to-end workflow is the "try it yourself" above. + +Subagent-level model routing has the same limitation described in the companion article regardless of which model you use: Cursor's Task tool only accepts `inherit` or its own `composer-2.5-fast`, so a subagent always runs on the parent conversation's model. That's a Cursor platform limitation, not specific to Grok, Claude, or Token Station. + +## Get started + +Sign up at [models.bytefuture.ai](https://models.bytefuture.ai/signup): $1 in free credit, no card required, with up to $50 in bonus credit on your first top-up. Export your key, wire it into Cursor's Models settings, and add `xai/grok-4.6`. + +[Try Token Station](https://models.bytefuture.ai/intro.html) diff --git a/src/content/writings/en/route-cursor-through-token-station.md b/src/content/writings/en/route-cursor-through-token-station.md index f0887dc..2561ae2 100644 --- a/src/content/writings/en/route-cursor-through-token-station.md +++ b/src/content/writings/en/route-cursor-through-token-station.md @@ -4,7 +4,7 @@ lang: "en" title: "Route Cursor through Token Station: Claude Sonnet 5 and Haiku" summary: "Cursor supports custom OpenAI-compatible providers through Settings, Models. Point it at Token Station and Claude Sonnet 5 and Haiku show up as selectable models with full Agent-mode support: real file edits, not just chat, plus scoped subagents for delegated research and verification." category: "tutorial" -date: "2026-08-21" +date: "2026-08-26" cta: "https://models.bytefuture.ai/intro.html" cover: "blog/route-cursor-through-token-station-cover.png" draft: false @@ -12,6 +12,8 @@ draft: false Cursor supports custom OpenAI-compatible providers through Settings → Models. Point it at Token Station's endpoint and you can add Claude Sonnet 5 and Haiku as selectable models, each billed through your own Token Station key. Unlike some other model families available through Token Station, these two fully support Cursor's Agent mode: real file edits, not just chat. This walks through the setup end to end, including a naming gotcha we hit doing it ourselves, and finishes with an actual coding session: Sonnet 5 implementing a real feature in an open-source project, delegating research and verification to two purpose-built subagents. +Before the setup, it's worth being explicit about why to route Cursor through Token Station at all, rather than paying Cursor directly. Three concrete reasons stand out. Cursor's Pro plan bundles a handful of models (Grok 4.6, Grok 4.5, Composer 2.5) into a shared monthly usage pool and meters everything else from a separate pool at each model's own API price, but neither pool gives you a per-model, per-request breakdown of what you actually spent. A Token Station key sidesteps both: BYOK requests go straight to Token Station's endpoint, never touch Cursor's own billing, and land on your own dashboard priced at the provider's real rate, with zero markup. Second, if Cursor is one of several coding tools you use (alongside Claude Code, Codex, or OpenClaw, say), the same Token Station key and the same model IDs work in all of them: one account and one balance to track, instead of separate keys, separate top-ups, and separate invoices per tool. Third, Token Station's catalog runs past 300 models across 30+ providers, well beyond whatever Cursor happens to bundle into its own pools. + ## What you need before starting - Cursor installed ([cursor.com/download](https://cursor.com/download)). @@ -145,7 +147,7 @@ Subagents work for scoping and permissions, `name`, `description`, and `readonly Earlier testing with Token Station's GPT-5.6 routes (Sol, Terra, Luna) found that Agent mode could read and discuss code but consistently failed to apply actual file edits, a tool-call response format issue on Token Station's side rather than a hard Cursor limitation. Support for those routes is in progress. If you want a coding agent that reliably edits files in Cursor today, route it through `anthropic/claude-sonnet-5` and `anthropic/claude-haiku-4-5` rather than the GPT-5.6 family. -Token Station's xAI route, `xai/grok-4.6`, is also supported in Cursor through the same custom-provider setup, if you'd rather try Grok for the main coding role. +Token Station's xAI route, `xai/grok-4.6`, is also supported in Cursor through the same custom-provider setup, if you'd rather try Grok for the main coding role. See the [companion article on running Grok 4.6 in Cursor](/blog/route-cursor-through-token-station-grok-4-6.html) for that setup specifically. ## Get started diff --git a/src/content/writings/ja/route-cursor-through-token-station-grok-4-6.md b/src/content/writings/ja/route-cursor-through-token-station-grok-4-6.md new file mode 100644 index 0000000..924c479 --- /dev/null +++ b/src/content/writings/ja/route-cursor-through-token-station-grok-4-6.md @@ -0,0 +1,152 @@ +--- +slug: "route-cursor-through-token-station-grok-4-6" +lang: "ja" +title: "Cursor を Token Station に接続する:Grok 4.6" +summary: "Cursor は Settings の Models パネルからカスタム OpenAI 互換プロバイダーに対応している。Token Station を指定すれば xAI の Grok 4.6 が選択可能なモデルとして現れ、自分のキーで課金され、Agent モードでのファイル編集も確認済みだ。Claude Sonnet 5 と Haiku のセットアップの姉妹編として、Grok 特有の違いを扱う。" +category: "tutorial" +date: "2026-08-26" +cta: "https://models.bytefuture.ai/intro.html" +cover: "blog/route-cursor-through-token-station-grok-4-6-cover.png" +draft: false +--- + +Cursor は Settings → Models からカスタム OpenAI 互換プロバイダーに対応している。Token Station のエンドポイントを指定すれば、xAI の Grok 4.6 を選択可能なモデルとして追加でき、自分の Token Station キーで課金される。これは [Claude Sonnet 5 と Haiku のセットアップ](/blog/route-cursor-through-token-station-ja.html)の姉妹編だ。プロバイダーの登録とサブエージェントの定義はどのモデルを追加する場合でもまったく同じ手順なので、この記事は短くまとめ、より踏み込んだ調査の詳細(Cursor 自身の組み込みエージェントとの名前衝突、そしてサブエージェントを親の会話とは別のモデルで実際に動かせなくしている Cursor プラットフォームのバグ)についてはそちらを参照してほしい。Grok に固有なのはステップ 2 と、下の Agent モードに関する注記だ。 + +設定に入る前に、Cursor に直接課金するのではなく、なぜわざわざ Token Station 経由で Cursor をルーティングするのかをはっきりさせておく価値がある。具体的な理由は三つある。Cursor の Pro プランは一部のモデル(Grok 4.6、Grok 4.5、Composer 2.5)を共通の月次利用枠にまとめており、それ以外のモデルは別の枠からそれぞれのモデル自身の API 価格で課金される。しかし、どちらの枠も実際に何にいくら使ったのかをモデルごと、リクエストごとに内訳として見せてはくれない。Token Station のキーはその両方を回避する。BYOK のリクエストは Token Station のエンドポイントに直接送られ、Cursor 自身の課金には一切触れず、プロバイダーの実際のレートでマークアップなしに、自分のダッシュボードにそのまま表示される。第二に、Cursor が使っている複数のコーディングツールの一つに過ぎない場合(たとえば Claude Code や Codex、OpenClaw も併用しているような場合)、同じ Token Station キーと同じモデル ID がそれらすべてで使える。ツールごとに別々のキーを用意し、別々にチャージし、別々に請求を突き合わせる代わりに、追跡すべきアカウントも残高も一つで済む。第三に、Token Station のカタログは 300 モデル、30 以上のプロバイダーを超えており、Cursor が自社の枠に詰め込んでいる範囲をはるかに超えている。 + +Grok に特有の点を一つ、先に触れておく価値がある。Cursor 自身の Pro プランは、すでに Grok 4.6 を自前の「Cursor Models」枠に組み込んでおり、Cursor 自身の利用枠の価格で課金している。代わりに Grok 4.6 を Token Station 経由でルーティングするということは、Cursor の組み込み枠を消費する代わりに、上で述べたコストの可視性と一元管理のメリットを得ながら、xAI の API レートを直接支払うということだ。 + +## 始める前に必要なもの + +- Cursor がインストール済みであること([cursor.com/download](https://cursor.com/download))。 +- Token Station のアカウントと API キー。[models.bytefuture.ai](https://models.bytefuture.ai) から無料登録できる。登録時に 1 ドル分のクレジットが付与され、クレジットカードは不要。 +- Cursor Pro。Agent モードでのカスタムモデル選択は、自分の API キーを設定していても無料プランではロックされているため、Chat モード以外の用途にはすべて Pro(月額 20 ドル)が必要になる。 + +## ステップ 1:Token Station をカスタムプロバイダーとして登録する + +**Settings → Cursor Settings → Models** を開き、**API Keys** までスクロールして、二つのフィールドを設定する。 + +- **OpenAI API Key**:Token Station のキーを入力する。 +- **Override OpenAI Base URL**:トグルをオンにし、デフォルト値を `https://models.bytefuture.ai/v1` に置き換える。 + +このステップはこれから追加するモデルに関係なく同じなので、姉妹編の記事と同じ録画をそのまま使う。 + +
+ +
Cursor の Models 設定で、Token Station をカスタム OpenAI 互換プロバイダーとして登録する。
+
+ +キーとURLが正しいことの確認を「Verify」ボタンに頼らないこと。常に表示されるわけではなく、表示されていてもすべての経路をカバーしているわけではない。信頼できる確認方法はステップ 2 だ。モデルを追加して、実際にメッセージを送ってみる。 + +## ステップ 2:Grok 4.6 をカスタムモデルとして追加する + +引き続き Models の設定で、**+ Add Custom Model** をクリックし、次を追加する。 + +``` +xai/grok-4.6 +``` + +**Claude のセットアップと同じ落とし穴**:ここで登録した名前を、Cursor はそのままリクエストの `model` フィールドとして送信する。Token Station の実際のルート名には `xai/` プレフィックスが含まれる。プレフィックスなしの `grok-4.6` として登録すると、リクエストは `Model 'grok-4.6' not found` というエラーで失敗する。プレフィックス付きで登録すればすぐに動作する。 + +Cursor に受け付けられただけでなく実際にエンドツーエンドで動作していることを確認するには、チャットを開いて Grok 4.6 を選び、適当なメッセージを送り、[Token Station のダッシュボード](https://models.bytefuture.ai/dashboard)を確認する。実際の返信があり、Recent Activity に対応する行が現れていれば、キー、ベース URL、モデル名のすべてが正しいということだ。 + +
+ Token Station のダッシュボードの Recent Activity に xai/grok-4.6 のリクエストが 0.01 ドルで表示されている +
Cursor から送った実際のリクエストが Token Station のキーに課金され、Recent Activity に xai/grok-4.6 として表示される。
+
+ +| モデル | 向いている用途 | +|---|---| +| `xai/grok-4.6` | メインのコーディングモデル。プランニング、実装、チャット、そして Agent モードでのファイル編集も確認済み(下記参照)。 | + +Grok 4.6 は Token Station 経由で Agent モードのファイル編集にも対応している。チャットだけでなく、実際にファイルへ適用される変更だ。 + +
+ +
Token Station 経由の Grok 4.6 が、Cursor の Agent モードで直接ファイルを編集する。
+
+ +## ステップ 3:範囲を絞ったサブエージェントを定義する + +姉妹編の記事と同じ二つのサブエージェント、読み取り専用の調査役とテスト検証役は、ここでも同じように動作する。`model:` フィールドがなぜサブエージェントを実際に別のモデルへルーティングしないのか、そしてなぜこの二つの名前に落ち着いたのかの詳細は、[Claude Sonnet 5 と Haiku の記事](/blog/route-cursor-through-token-station-ja.html)にある。ここでは短縮版を示す。 + +**`.cursor/agents/bill-the-explorer.md`** +```markdown +--- +name: bill-the-explorer +description: Searches and reads the codebase to answer questions about existing code. Use proactively before implementing anything unfamiliar. +model: inherit +readonly: true +--- + +You are a fast, read-only research agent. Find and summarize relevant +files, functions, and patterns. Never edit files or run mutating commands. +``` + +**`.cursor/agents/jill-the-test-runner.md`** +```markdown +--- +name: jill-the-test-runner +description: Runs the test suite and reports pass/fail results with failure details. Use proactively after any code change. +model: inherit +--- + +You run the project's test command, capture output, and report which +tests passed or failed and why. Do not modify source files. +``` + +ここでは特定のモデルを指定するのではなく、明示的に `model: inherit` を使っている。Cursor の Task ツールは現状、サブエージェントに指定されたカスタムモデルを反映しないため、何を指定してもメインの会話が使っているモデル(この構成では Grok 4.6)で動作するからだ。`inherit` はそのことを率直に示しており、実際には存在しないコスト階層を暗示することもない。 + +これらのサブエージェントを作成する手順は姉妹編の記事とまったく同じなので、同じ録画をそのまま使う。 + +
+ +
bill-the-explorer と jill-the-test-runner の二つのサブエージェントを作成する。
+
+ +姉妹編の記事から繰り返す価値のある点がもう一つある。サブエージェントの名前は、Cursor 自身の組み込みエージェントと衝突しないものにすること。`explore` は実在する組み込みの名前で、こちらの定義ではなくその組み込みエージェントへ静かにルーティングされてしまい、何のエラーも出ない。`bill-the-explorer` と `jill-the-test-runner` ならこの問題を避けられる。 + +## 自分で試してみる:同じ httpie タスク + +私たちは Claude Sonnet 5 で、この二つのサブエージェントに調査と検証を委任しながら、[httpie](https://github.com/httpie/httpie) の実際の機能に対して完全なセッションを実行した。リダイレクトをたどった後に実際に到達した URL を、既存の経過時間の隣に httpie の `--meta` 出力へ追加するというものだ。そのセッションと録画は姉妹編の記事にある。 + +Grok 4.6 をメインモデルとして、サブエージェント委任を含むその同じ複数ステップのセッションはまだ実行していないので、このセクションは「自分で試してみる」であって、この具体的なタスクで何が起きたかの報告ではない。上で確認済みなのは、Grok 4.6 が Token Station 経由で実際に Agent モードのファイル編集を適用できるということであり、タスク全体が失敗すると考える根本的な理由はもうない。委任を確実にトリガーする方法は明示的な呼び出しだと分かっている。地の文で「explore サブエージェントを使って」と頼んでも、実際には委任されない。同じ三つのメッセージの並びを、そのまま Grok 4.6 を選んだ状態で試す価値がある。 + +**メッセージ 1**、調査を委任する。 +``` +/bill-the-explorer find how elapsed time is computed and displayed in HTTPie's --meta output, and identify where to add the effective URL, the URL actually reached after following any redirects, alongside it. +``` + +**メッセージ 2**、調査結果が戻ってきたら、メインエージェントに戻る。 +``` +Using what bill-the-explorer found, add the effective URL next to the existing elapsed time in HTTPie's --meta output. Add a test that confirms it works for both a redirected and a non-redirected request. +``` + +**メッセージ 3**、検証を委任する。 +``` +/jill-the-test-runner verify the new effective-URL test passes, along with the rest of the test suite. Report any failures separately from the two known pre-existing Big5 charset-detection failures in tests/test_encoding.py, which are unrelated to this change. +``` + +単発の Agent モード編集はすでに確認済みだ。この一連のメッセージが実際に試すのは、実際のサブエージェント委任を伴う調査・実装・検証のワークフロー全体が、Claude Sonnet 5 のときと同じように複数ステップのセッションを通して成立するかどうかだ。 + +## 今できること + +Chat モードと Agent モードのどちらでも、Grok 4.6 は Token Station 経由で Cursor の中で使える。実際の返信、実際のファイル編集があり、正しく Token Station のキーに課金され、ダッシュボードにも表示される。プロバイダーの登録とサブエージェントの定義は Claude のセットアップとまったく同じ手順であり、どちらもどのモデルを追加するかには依存しない。 + +これにより Grok 4.6 は、Claude Sonnet 5 と並んで、Token Station 経由で Agent モードの編集を確実に動かせるルートとなった。これはどのモデルファミリーにも当てはまるわけではない。以前のテストでは、Token Station の GPT-5.6 ルート(Sol、Terra、Luna)は Agent モードでコードを読み議論することはできたが、実際のファイル編集を適用することには一貫して失敗した。これは Cursor 側の硬い制限ではなく、Token Station 側のツール呼び出しレスポンス形式の問題であり、対応は現在進行中だ。ツール呼び出しの互換性は結局のところモデルとプロバイダーに強く依存することが分かったため、Grok については Claude からの類推ではなく、それ自体の実測結果に基づいて確認されている。 + +まだテストしていない具体的な部分は、Grok 4.6 をメインモデルとした、調査の委任、実装、検証の委任までを含む実際のタスクに対する完全な複数ステップのセッションだ。その土台となる単発編集の能力はすでに確認済みで、エンドツーエンドのワークフローは上の「自分で試してみる」に当たる。 + +サブエージェント側のモデルルーティングは、どのモデルを使っていても姉妹編の記事で説明したのと同じ制限を持つ。Cursor の Task ツールは `inherit` か自身の `composer-2.5-fast` しか受け付けないため、サブエージェントは常に親の会話が使っているモデルで動作する。これは Cursor プラットフォーム自体の制限であり、Grok、Claude、Token Station に固有の問題ではない。 + +## はじめよう + +[models.bytefuture.ai](https://models.bytefuture.ai/signup) で登録する。1 ドル分の無料クレジット、クレジットカード不要。初回チャージで最大 50 ドルのボーナスも付く。キーをエクスポートし、Cursor の Models 設定に接続し、`xai/grok-4.6` を追加しよう。 + +[Token Station を試す](https://models.bytefuture.ai/intro.html) diff --git a/src/content/writings/ja/route-cursor-through-token-station.md b/src/content/writings/ja/route-cursor-through-token-station.md index 53fb2df..e20921d 100644 --- a/src/content/writings/ja/route-cursor-through-token-station.md +++ b/src/content/writings/ja/route-cursor-through-token-station.md @@ -4,7 +4,7 @@ lang: "ja" title: "Cursor を Token Station に接続する:Claude Sonnet 5 と Haiku" summary: "Cursor は Settings の Models パネルからカスタム OpenAI 互換プロバイダーに対応している。Token Station を指定すれば Claude Sonnet 5 と Haiku が選択可能なモデルとして現れ、Agent モードも完全にサポートする。チャットだけでなく実際のファイル編集ができ、調査と検証を任せる専用のサブエージェントも使える。" category: "tutorial" -date: "2026-08-21" +date: "2026-08-26" cta: "https://models.bytefuture.ai/intro.html" cover: "blog/route-cursor-through-token-station-cover.png" draft: false @@ -12,6 +12,8 @@ draft: false Cursor は Settings → Models からカスタム OpenAI 互換プロバイダーに対応している。Token Station のエンドポイントを指定すれば、Claude Sonnet 5 と Haiku を選択可能なモデルとして追加でき、すべて自分の Token Station キーで課金される。Token Station 上の他のいくつかのモデルファミリーと違い、この二つは Cursor の Agent モードを完全にサポートする。チャットだけでなく、実際のファイル編集ができるということだ。ここでは設定を最初から最後まで説明する。実際にやってみて遭遇した命名上の落とし穴も含めて、最後には実際のコーディングセッションまで見せる。Sonnet 5 がオープンソースプロジェクトで実際の機能を実装し、調査と検証を二つの専用サブエージェントに委任する様子だ。 +設定に入る前に、Cursor に直接課金するのではなく、なぜわざわざ Token Station 経由で Cursor をルーティングするのかをはっきりさせておく価値がある。具体的な理由は三つある。Cursor の Pro プランは一部のモデル(Grok 4.6、Grok 4.5、Composer 2.5)を共通の月次利用枠にまとめており、それ以外のモデルは別の枠からそれぞれのモデル自身の API 価格で課金される。しかし、どちらの枠も実際に何にいくら使ったのかをモデルごと、リクエストごとに内訳として見せてはくれない。Token Station のキーはその両方を回避する。BYOK のリクエストは Token Station のエンドポイントに直接送られ、Cursor 自身の課金には一切触れず、プロバイダーの実際のレートでマークアップなしに、自分のダッシュボードにそのまま表示される。第二に、Cursor が使っている複数のコーディングツールの一つに過ぎない場合(たとえば Claude Code や Codex、OpenClaw も併用しているような場合)、同じ Token Station キーと同じモデル ID がそれらすべてで使える。ツールごとに別々のキーを用意し、別々にチャージし、別々に請求を突き合わせる代わりに、追跡すべきアカウントも残高も一つで済む。第三に、Token Station のカタログは 300 モデル、30 以上のプロバイダーを超えており、Cursor が自社の枠に詰め込んでいる範囲をはるかに超えている。 + ## 始める前に必要なもの - Cursor がインストール済みであること([cursor.com/download](https://cursor.com/download))。 @@ -145,7 +147,7 @@ Chat モードと Agent モードのどちらでも、Sonnet 5 と Haiku は Tok 以前 Token Station の GPT-5.6 ルート(Sol、Terra、Luna)をテストしたところ、Agent モードでコードを読み議論することはできたが、実際のファイル編集を適用することには一貫して失敗した。これは Cursor 側の硬い制限ではなく、Token Station 側のツール呼び出しレスポンス形式の問題だった。これらのルートへの対応は現在進行中だ。今すぐ Cursor で確実にファイルを編集できるコーディングエージェントが必要なら、GPT-5.6 系ではなく `anthropic/claude-sonnet-5` と `anthropic/claude-haiku-4-5` を使ってほしい。 -Token Station の xAI ルート `xai/grok-4.6` も、同じカスタムプロバイダーの設定で Cursor から使える。メインのコーディング役に Grok を試したい場合はこちらだ。 +Token Station の xAI ルート `xai/grok-4.6` も、同じカスタムプロバイダーの設定で Cursor から使える。メインのコーディング役に Grok を試したい場合はこちらだ。その設定については姉妹編の記事、[Cursor で Grok 4.6 を動かす](/blog/route-cursor-through-token-station-grok-4-6-ja.html)を参照してほしい。 ## はじめよう diff --git a/src/content/writings/ko/route-cursor-through-token-station-grok-4-6.md b/src/content/writings/ko/route-cursor-through-token-station-grok-4-6.md new file mode 100644 index 0000000..62c660b --- /dev/null +++ b/src/content/writings/ko/route-cursor-through-token-station-grok-4-6.md @@ -0,0 +1,152 @@ +--- +slug: "route-cursor-through-token-station-grok-4-6" +lang: "ko" +title: "Cursor를 Token Station에 연결하기: Grok 4.6" +summary: "Cursor는 Settings의 Models 패널에서 커스텀 OpenAI 호환 프로바이더를 지원한다. Token Station을 지정하면 xAI의 Grok 4.6이 선택 가능한 모델로 나타나며, 자신의 키로 과금되고 Agent 모드에서의 파일 편집도 확인됐다. Claude Sonnet 5와 Haiku 설정의 자매편으로, Grok에서 무엇이 다른지 다룬다." +category: "tutorial" +date: "2026-08-26" +cta: "https://models.bytefuture.ai/intro.html" +cover: "blog/route-cursor-through-token-station-grok-4-6-cover.png" +draft: false +--- + +Cursor는 Settings → Models에서 커스텀 OpenAI 호환 프로바이더를 지원한다. Token Station의 엔드포인트를 지정하면 xAI의 Grok 4.6을 선택 가능한 모델로 추가할 수 있고, 자신의 Token Station 키로 과금된다. 이 글은 [Claude Sonnet 5와 Haiku 설정](/blog/route-cursor-through-token-station-ko.html) 글의 자매편이다. 프로바이더 등록과 서브에이전트 정의는 어떤 모델을 추가하든 완전히 동일한 방식으로 작동하므로, 이 글은 짧게 유지하고 더 깊은 조사 내용(Cursor 자체의 내장 에이전트와 이름이 겹치는 문제, 그리고 서브에이전트가 부모 대화와 다른 모델로 실제로 동작하지 못하게 막는 Cursor 플랫폼 버그)은 그 글을 참고하도록 한다. Grok에 특유한 부분은 2단계와 아래 Agent 모드에 관한 내용이다. + +설정에 들어가기 전에, Cursor에 직접 돈을 내는 대신 왜 굳이 Token Station을 거쳐 Cursor를 라우팅하는지 분명히 짚어볼 필요가 있다. 구체적인 이유는 세 가지다. Cursor의 Pro 플랜은 일부 모델(Grok 4.6, Grok 4.5, Composer 2.5)을 공유 월간 사용량 풀에 묶어 두고, 나머지 모델은 각 모델 자체의 API 가격으로 별도의 풀에서 과금한다. 하지만 어느 풀도 실제로 무엇에 얼마를 썼는지 모델별, 요청별로 나눠 보여주지는 않는다. Token Station 키는 이 두 풀을 모두 건너뛴다. BYOK 요청은 Token Station의 엔드포인트로 곧장 전달되어 Cursor 자체의 과금을 전혀 거치지 않고, 프로바이더의 실제 요율로 마진 없이 자신의 대시보드에 그대로 나타난다. 둘째, Cursor가 여러 코딩 도구 중 하나일 뿐이라면(예를 들어 Claude Code나 Codex, OpenClaw도 함께 쓴다면), 같은 Token Station 키와 같은 모델 ID가 그 모든 도구에서 똑같이 작동한다. 도구마다 별도의 키를 발급받고, 따로 충전하고, 따로 정산을 맞추는 대신 추적해야 할 계정과 잔액이 하나로 줄어든다. 셋째, Token Station의 카탈로그는 300개 이상의 모델, 30개가 넘는 프로바이더를 아우르며, Cursor가 자체 풀에 담아 놓은 범위를 훨씬 뛰어넘는다. + +Grok에 특유한 부분 하나를 미리 짚어두자면, Cursor 자체의 Pro 플랜은 이미 Grok 4.6을 자체 "Cursor Models" 풀에 포함시켜, Cursor 자체의 사용량 풀 가격으로 과금하고 있다. 대신 Grok 4.6을 Token Station으로 라우팅한다는 것은, Cursor의 번들 할당량을 소진하는 대신 위에서 말한 비용 가시성과 통합 관리의 이점을 누리면서 xAI의 API 요율을 직접 지불한다는 뜻이다. + +## 시작하기 전에 필요한 것 + +- Cursor 설치([cursor.com/download](https://cursor.com/download)). +- Token Station 계정과 API 키. [models.bytefuture.ai](https://models.bytefuture.ai)에서 무료로 가입할 수 있다. 가입 시 1달러 크레딧이 지급되며 카드는 필요 없다. +- Cursor Pro. Agent 모드에서의 커스텀 모델 선택은 자신의 API 키가 있어도 무료 플랜에서는 막혀 있어서, Chat 모드를 넘어서는 모든 용도에 Pro(월 20달러)가 필요하다. + +## 1단계: Token Station을 커스텀 프로바이더로 등록하기 + +**Settings → Cursor Settings → Models**를 열고 **API Keys**까지 스크롤한 다음, 두 필드를 설정한다. + +- **OpenAI API Key**: Token Station 키를 입력한다. +- **Override OpenAI Base URL**: 토글을 켜고, 기본값을 `https://models.bytefuture.ai/v1`로 바꾼다. + +이 단계는 앞으로 추가할 모델과 무관하게 동일하므로, 자매편 글과 같은 영상을 그대로 사용한다. + +
+ +
Cursor의 Models 설정에서 Token Station을 커스텀 OpenAI 호환 프로바이더로 등록하는 과정.
+
+ +키와 URL이 올바른지 확인할 때 "Verify" 버튼에 의존하지 말자. 항상 나타나는 것도 아니고, 나타나더라도 모든 경로를 커버하지는 않는다. 믿을 만한 확인 방법은 2단계다: 모델을 추가하고 실제로 메시지를 보내보는 것. + +## 2단계: Grok 4.6을 커스텀 모델로 추가하기 + +여전히 Models 설정에서, **+ Add Custom Model**을 클릭해 다음을 추가한다. + +``` +xai/grok-4.6 +``` + +**Claude 설정과 같은 함정**: 여기서 등록한 이름을 Cursor는 그대로 요청의 `model` 필드로 보낸다. Token Station의 실제 라우트 이름에는 `xai/` 접두사가 붙어 있다. 접두사 없이 `grok-4.6`으로 등록하면 요청이 `Model 'grok-4.6' not found` 오류로 실패한다. 접두사를 붙여 등록하면 바로 작동한다. + +Cursor에 받아들여진 것뿐 아니라 실제로 엔드투엔드로 작동하는지 확인하려면, 채팅을 열어 Grok 4.6을 선택하고 아무 메시지나 보낸 다음 [Token Station 대시보드](https://models.bytefuture.ai/dashboard)를 확인한다. 실제 응답과 함께 Recent Activity에 해당하는 항목이 나타난다면, 키와 base URL, 모델 이름이 모두 올바르다는 뜻이다. + +
+ Token Station 대시보드의 Recent Activity에 xai/grok-4.6 요청이 0.01달러로 표시된 모습 +
Cursor를 통해 보낸 실제 요청이 Token Station 키에 과금되어 Recent Activity에 xai/grok-4.6으로 표시된다.
+
+ +| 모델 | 적합한 용도 | +|---|---| +| `xai/grok-4.6` | 메인 코딩 모델. 플래닝, 구현, 채팅, 그리고 확인된 Agent 모드 파일 편집까지(아래 참고). | + +Grok 4.6은 Token Station을 통해 Agent 모드 파일 편집도 지원한다. 채팅뿐 아니라 실제로 파일에 적용되는 편집이다. + +
+ +
Token Station을 통해 라우팅된 Grok 4.6이 Cursor의 Agent 모드에서 파일을 직접 편집한다.
+
+ +## 3단계: 범위가 명확한 서브에이전트 정의하기 + +자매편 글과 같은 두 서브에이전트, 읽기 전용 조사 역할과 테스트 검증 역할이 여기서도 똑같이 작동한다. `model:` 필드가 왜 서브에이전트를 실제로 다른 모델로 라우팅하지 못하는지, 그리고 왜 이 두 이름으로 정했는지에 대한 전체 내용은 [Claude Sonnet 5와 Haiku 글](/blog/route-cursor-through-token-station-ko.html)에 있다. 여기서는 짧은 버전만 다룬다. + +**`.cursor/agents/bill-the-explorer.md`** +```markdown +--- +name: bill-the-explorer +description: Searches and reads the codebase to answer questions about existing code. Use proactively before implementing anything unfamiliar. +model: inherit +readonly: true +--- + +You are a fast, read-only research agent. Find and summarize relevant +files, functions, and patterns. Never edit files or run mutating commands. +``` + +**`.cursor/agents/jill-the-test-runner.md`** +```markdown +--- +name: jill-the-test-runner +description: Runs the test suite and reports pass/fail results with failure details. Use proactively after any code change. +model: inherit +--- + +You run the project's test command, capture output, and report which +tests passed or failed and why. Do not modify source files. +``` + +여기서는 특정 모델을 지정하는 대신 명시적으로 `model: inherit`를 사용한다. Cursor의 Task 도구가 현재 서브에이전트에 지정된 커스텀 모델을 반영하지 않아서, 무엇을 지정하든 서브에이전트는 메인 대화가 사용 중인 모델(이 구성에서는 Grok 4.6)로 동작하기 때문이다. `inherit`는 이 사실을 있는 그대로 보여주며, 실제로는 존재하지 않는 비용 등급을 암시하지 않는다. + +이 서브에이전트들을 만드는 과정은 자매편 글과 완전히 동일하므로, 같은 영상을 그대로 사용한다. + +
+ +
bill-the-explorer와 jill-the-test-runner 두 서브에이전트를 만드는 과정.
+
+ +자매편 글에서 반복할 가치가 있는 내용이 하나 더 있다. 서브에이전트 이름은 Cursor 자체의 내장 에이전트와 겹치지 않는 것으로 짓자. `explore`는 실제로 존재하는 내장 이름이라, 직접 정의한 것 대신 그 내장 에이전트로 조용히 라우팅되며 아무 오류도 나지 않는다. `bill-the-explorer`와 `jill-the-test-runner`는 이 문제를 피한다. + +## 직접 시도해보기: 같은 httpie 작업 + +우리는 Claude Sonnet 5로 이 두 서브에이전트에 조사와 검증을 위임하며 [httpie](https://github.com/httpie/httpie)의 실제 기능에 대해 전체 세션을 실행했다. 리다이렉트를 따라간 뒤 실제로 도달한 URL을, 기존 경과 시간 옆에 httpie의 `--meta` 출력으로 추가하는 작업이었다. 그 세션과 영상은 자매편 글에 있다. + +Grok 4.6을 메인 모델로 해서 서브에이전트 위임을 포함한 그 동일한 다단계 세션은 아직 실행해보지 않았으므로, 이 절은 이 구체적인 작업에서 무슨 일이 있었는지에 대한 보고가 아니라 여전히 "직접 시도해보기"다. 위에서 확인된 것은 Grok 4.6이 Token Station을 통해 실제 Agent 모드 파일 편집을 적용할 수 있다는 점이며, 따라서 전체 작업이 실패할 것이라고 볼 근본적인 이유는 더 이상 없다. 위임을 확실하게 트리거하는 방법은 명시적 호출이라는 것이 확인됐다. 그냥 문장으로 "explore 서브에이전트를 써서"라고 요청해서는 실제로 위임되지 않는다. 같은 세 메시지 순서를, 그대로 Grok 4.6을 선택한 상태에서 시도해볼 가치가 있다. + +**메시지 1**, 조사를 위임한다. +``` +/bill-the-explorer find how elapsed time is computed and displayed in HTTPie's --meta output, and identify where to add the effective URL, the URL actually reached after following any redirects, alongside it. +``` + +**메시지 2**, 조사 결과가 나오면 메인 에이전트로 돌아간다. +``` +Using what bill-the-explorer found, add the effective URL next to the existing elapsed time in HTTPie's --meta output. Add a test that confirms it works for both a redirected and a non-redirected request. +``` + +**메시지 3**, 검증을 위임한다. +``` +/jill-the-test-runner verify the new effective-URL test passes, along with the rest of the test suite. Report any failures separately from the two known pre-existing Big5 charset-detection failures in tests/test_encoding.py, which are unrelated to this change. +``` + +단발성 Agent 모드 편집은 이미 확인됐다. 이 메시지 순서가 실제로 테스트하는 것은, 실제 서브에이전트 위임을 포함한 조사-구현-검증 워크플로 전체가 Claude Sonnet 5 때와 마찬가지로 다단계 세션에서도 안정적으로 이어지는가다. + +## 지금 되는 것 + +Chat 모드와 Agent 모드 모두에서 Grok 4.6은 Token Station을 통해 Cursor 안에서 사용할 수 있다. 실제 응답, 실제 파일 편집이 이루어지고, Token Station 키에 정확히 과금되며, 대시보드에서도 확인된다. 프로바이더 등록과 서브에이전트 정의는 Claude 설정과 완전히 동일한데, 둘 다 어떤 모델을 추가하는지와 무관하기 때문이다. + +이로써 Grok 4.6은 Claude Sonnet 5와 나란히, Token Station을 통해 Agent 모드 편집을 안정적으로 구동하는 라우트가 됐다. 이는 모든 모델 계열에 당연히 적용되는 이야기가 아니다. 이전 테스트에서는 Token Station의 GPT-5.6 라우트(Sol, Terra, Luna)가 Agent 모드에서 코드를 읽고 논의할 수는 있었지만 실제 파일 편집을 적용하는 데는 계속 실패했다. 이는 Cursor 쪽의 고정된 제약이 아니라 Token Station 쪽의 도구 호출 응답 형식 문제였고, 지원은 현재 진행 중이다. 도구 호출 호환성은 결국 모델과 프로바이더에 따라 실제로 달라진다는 것이 드러났으므로, Grok은 Claude와의 유추가 아니라 그 자체의 실측 증거로 여기서 확인된 것이다. + +아직 테스트하지 않은 구체적인 부분은, Grok 4.6을 메인 모델로 해서 조사 위임, 구현, 검증 위임까지 포함하는 실제 작업에 대한 완전한 다단계 세션이다. 그 바탕이 되는 단발 편집 능력은 이미 확인됐고, 엔드투엔드 워크플로는 위의 "직접 시도해보기"에 해당한다. + +서브에이전트 단위의 모델 라우팅은 어떤 모델을 쓰든 자매편 글에서 설명한 것과 같은 제약을 가진다. Cursor의 Task 도구는 `inherit`나 자체 `composer-2.5-fast`만 받아들이기 때문에, 서브에이전트는 항상 부모 대화가 사용 중인 모델로 동작한다. 이는 Cursor 플랫폼 자체의 제약이며, Grok이나 Claude, Token Station에 국한된 문제가 아니다. + +## 시작하기 + +[models.bytefuture.ai](https://models.bytefuture.ai/signup)에서 가입하자. 1달러 무료 크레딧, 카드 불필요, 첫 충전 시 최대 50달러 보너스도 받을 수 있다. 키를 export하고 Cursor의 Models 설정에 연결한 다음, `xai/grok-4.6`을 추가하자. + +[Token Station 사용해보기](https://models.bytefuture.ai/intro.html) diff --git a/src/content/writings/ko/route-cursor-through-token-station.md b/src/content/writings/ko/route-cursor-through-token-station.md index 2552f40..9688807 100644 --- a/src/content/writings/ko/route-cursor-through-token-station.md +++ b/src/content/writings/ko/route-cursor-through-token-station.md @@ -4,7 +4,7 @@ lang: "ko" title: "Cursor를 Token Station에 연결하기: Claude Sonnet 5와 Haiku" summary: "Cursor는 Settings의 Models 패널에서 커스텀 OpenAI 호환 프로바이더를 지원한다. Token Station을 지정하면 Claude Sonnet 5와 Haiku가 선택 가능한 모델로 나타나며, Agent 모드까지 완전히 지원한다. 채팅뿐 아니라 실제 파일 편집이 가능하고, 조사와 검증을 맡기는 전용 서브에이전트도 쓸 수 있다." category: "tutorial" -date: "2026-08-21" +date: "2026-08-26" cta: "https://models.bytefuture.ai/intro.html" cover: "blog/route-cursor-through-token-station-cover.png" draft: false @@ -12,6 +12,8 @@ draft: false Cursor는 Settings → Models에서 커스텀 OpenAI 호환 프로바이더를 지원한다. Token Station의 엔드포인트를 지정하면 Claude Sonnet 5와 Haiku를 선택 가능한 모델로 추가할 수 있고, 모두 자신의 Token Station 키로 과금된다. Token Station에 있는 다른 몇몇 모델 계열과 달리, 이 둘은 Cursor의 Agent 모드를 완전히 지원한다. 채팅뿐 아니라 실제 파일 편집이 가능하다는 뜻이다. 여기서는 설정 과정을 처음부터 끝까지 다룬다. 직접 해보면서 만난 이름 관련 함정도 포함해서다. 마지막에는 실제 코딩 세션까지 보여준다. Sonnet 5가 오픈소스 프로젝트에서 실제 기능을 구현하고, 조사와 검증을 두 개의 전용 서브에이전트에 위임하는 과정이다. +설정에 들어가기 전에, Cursor에 직접 돈을 내는 대신 왜 굳이 Token Station을 거쳐 Cursor를 라우팅하는지 분명히 짚어볼 필요가 있다. 구체적인 이유는 세 가지다. Cursor의 Pro 플랜은 일부 모델(Grok 4.6, Grok 4.5, Composer 2.5)을 공유 월간 사용량 풀에 묶어 두고, 나머지 모델은 각 모델 자체의 API 가격으로 별도의 풀에서 과금한다. 하지만 어느 풀도 실제로 무엇에 얼마를 썼는지 모델별, 요청별로 나눠 보여주지는 않는다. Token Station 키는 이 두 풀을 모두 건너뛴다. BYOK 요청은 Token Station의 엔드포인트로 곧장 전달되어 Cursor 자체의 과금을 전혀 거치지 않고, 프로바이더의 실제 요율로 마진 없이 자신의 대시보드에 그대로 나타난다. 둘째, Cursor가 여러 코딩 도구 중 하나일 뿐이라면(예를 들어 Claude Code나 Codex, OpenClaw도 함께 쓴다면), 같은 Token Station 키와 같은 모델 ID가 그 모든 도구에서 똑같이 작동한다. 도구마다 별도의 키를 발급받고, 따로 충전하고, 따로 정산을 맞추는 대신 추적해야 할 계정과 잔액이 하나로 줄어든다. 셋째, Token Station의 카탈로그는 300개 이상의 모델, 30개가 넘는 프로바이더를 아우르며, Cursor가 자체 풀에 담아 놓은 범위를 훨씬 뛰어넘는다. + ## 시작하기 전에 필요한 것 - Cursor 설치([cursor.com/download](https://cursor.com/download)). @@ -145,7 +147,7 @@ Chat 모드와 Agent 모드 모두에서 Sonnet 5와 Haiku는 Token Station을 이전에 Token Station의 GPT-5.6 라우트(Sol, Terra, Luna)를 테스트했을 때는, Agent 모드에서 코드를 읽고 논의할 수는 있었지만 실제 파일 편집을 적용하는 데는 계속 실패했다. 이는 Cursor 쪽의 고정된 제약이 아니라 Token Station 쪽의 도구 호출 응답 형식 문제였다. 이 라우트들에 대한 지원은 현재 진행 중이다. 지금 당장 Cursor에서 안정적으로 파일을 편집하는 코딩 에이전트가 필요하다면, GPT-5.6 계열 대신 `anthropic/claude-sonnet-5`와 `anthropic/claude-haiku-4-5`를 사용하자. -Token Station의 xAI 라우트인 `xai/grok-4.6`도 같은 커스텀 프로바이더 설정으로 Cursor에서 사용할 수 있다. 메인 코딩 역할에 Grok을 써보고 싶다면 이 라우트를 쓰면 된다. +Token Station의 xAI 라우트인 `xai/grok-4.6`도 같은 커스텀 프로바이더 설정으로 Cursor에서 사용할 수 있다. 메인 코딩 역할에 Grok을 써보고 싶다면 이 라우트를 쓰면 된다. 구체적인 설정은 자매편 글인 [Cursor에서 Grok 4.6 실행하기](/blog/route-cursor-through-token-station-grok-4-6-ko.html)를 참고하자. ## 시작하기 diff --git a/src/content/writings/zh/route-cursor-through-token-station-grok-4-6.md b/src/content/writings/zh/route-cursor-through-token-station-grok-4-6.md new file mode 100644 index 0000000..2fcf23b --- /dev/null +++ b/src/content/writings/zh/route-cursor-through-token-station-grok-4-6.md @@ -0,0 +1,152 @@ +--- +slug: "route-cursor-through-token-station-grok-4-6" +lang: "zh" +title: "在 Cursor 中接入 Token Station:Grok 4.6" +summary: "Cursor 在设置里的 Models 面板支持自定义 OpenAI 兼容 provider。把它指向 Token Station,xAI 的 Grok 4.6 就会作为可选模型出现,通过你自己的 key 计费,并已确认支持 Agent 模式的文件编辑。这是 Claude Sonnet 5 和 Haiku 那篇文章的姐妹篇,介绍 Grok 有哪些不同之处。" +category: "tutorial" +date: "2026-08-26" +cta: "https://models.bytefuture.ai/intro.html" +cover: "blog/route-cursor-through-token-station-grok-4-6-cover.png" +draft: false +--- + +Cursor 在 Settings → Models 里支持自定义 OpenAI 兼容 provider。把它指向 Token Station 的端点,就能把 xAI 的 Grok 4.6 添加为可选模型,通过你自己的 Token Station key 计费。这是我们 [Claude Sonnet 5 和 Haiku 配置](/blog/route-cursor-through-token-station-zh.html)那篇文章的姐妹篇:注册 provider 和定义 subagent 的过程完全一样,不管你要添加的是哪个模型,所以这篇会写得比较简短,具体的深入调查细节(一个和 Cursor 自带 agent 撞名的 subagent 命名问题,以及一个让 subagent 无法真正运行在与主对话不同模型上的 Cursor 平台 bug)请回那篇文章看。Grok 特有的内容在步骤 2 和下面关于 Agent 模式的部分。 + +在开始配置之前,有必要说清楚为什么要通过 Token Station 来路由 Cursor,而不是直接付费给 Cursor。有三个具体的理由。Cursor 的 Pro 计划把一部分模型(Grok 4.6、Grok 4.5、Composer 2.5)打包进一个共享的月度用量池,其余模型则从另一个池子里按各自的 API 价格计费,但这两个池子都不会给你一份按模型、按请求拆分的实际花费明细。Token Station 的 key 会绕开这两个池子:BYOK 请求直接发往 Token Station 的端点,完全不经过 Cursor 自己的计费,会按 provider 的真实费率、零加价,显示在你自己的控制台里。第二,如果 Cursor 只是你使用的多个编码工具之一(比如同时还用 Claude Code、Codex 或 OpenClaw),同一个 Token Station key 和同一批模型 ID 在所有这些工具里都能用:只需要一个账户、一个余额去追踪,而不必给每个工具单独准备 key、单独充值、单独对账。第三,Token Station 的模型目录已经超过 300 个模型、来自 30 多家 provider,远远超出 Cursor 自己打包进那些用量池里的范围。 + +有一个 Grok 特有的细节值得提前说明:Cursor 自己的 Pro 计划已经把 Grok 4.6 打包进了它原生的"Cursor Models"池,按 Cursor 自己的用量池定价计费。改由 Token Station 来路由 Grok 4.6,意味着你是在直接支付 xAI 的 API 费率,享受上面提到的成本可见性和统一管理的好处,而不是消耗 Cursor 打包好的那份额度。 + +## 开始之前需要准备什么 + +- 已安装 Cursor([cursor.com/download](https://cursor.com/download))。 +- 一个 Token Station 账户和 API 密钥。免费注册:[models.bytefuture.ai](https://models.bytefuture.ai),注册即送 1 美元额度,无需信用卡。 +- Cursor Pro。免费版即使填了自己的 API key,Agent 模式下的自定义模型选择依然是锁死的,所以除了 Chat 模式之外的任何用法都需要 Pro(每月 20 美元)。 + +## 步骤 1:将 Token Station 注册为自定义 provider + +打开 **Settings → Cursor Settings → Models**,滚动到 **API Keys**,设置两个字段: + +- **OpenAI API Key**:填入你的 Token Station 密钥。 +- **Override OpenAI Base URL**:打开开关,把默认值替换成 `https://models.bytefuture.ai/v1`。 + +这一步和你接下来要添加哪个模型无关,所以直接复用姐妹篇文章里的这段录屏: + +
+ +
在 Cursor 的 Models 设置里,把 Token Station 注册为自定义 OpenAI 兼容 provider。
+
+ +不要指望靠一个"Verify"按钮来确认密钥和地址是否正确。它不一定总会出现,即使出现了也不能覆盖所有路径。真正可靠的确认方式是步骤 2:添加模型,然后真的给它发一条消息。 + +## 步骤 2:将 Grok 4.6 添加为自定义模型 + +还是在 Models 设置里,点击 **+ Add Custom Model**,添加: + +``` +xai/grok-4.6 +``` + +**和 Claude 配置一样的命名坑**:你在这里注册的名字,Cursor 会原样作为请求里的 `model` 字段发出去,而 Token Station 真实的路由名称里包含 `xai/` 前缀。注册成不带前缀的 `grok-4.6`,请求会全部失败,报错 `Model 'grok-4.6' not found`。带上前缀注册,立刻就能用。 + +要确认这套流程真的端到端跑通了,而不只是被 Cursor 接受了:打开一个对话,选中 Grok 4.6,发一条无关紧要的消息,然后去 [Token Station 控制台](https://models.bytefuture.ai/dashboard) 查看。真实的回复加上 Recent Activity 里对应的一条记录,说明密钥、base URL 和模型名都是对的。 + +
+ Token Station 控制台 Recent Activity 显示一条 xai/grok-4.6 请求,费用 0.01 美元 +
通过 Cursor 发出的一条真实请求,计费到 Token Station 密钥,在 Recent Activity 里显示为 xai/grok-4.6。
+
+ +| 模型 | 适用场景 | +|---|---| +| `xai/grok-4.6` | 主力编码模型:规划、实现、聊天,并已确认支持 Agent 模式下的文件编辑(见下文)。 | + +Grok 4.6 通过 Token Station 支持 Agent 模式的文件编辑,是真正应用到文件上的改动,不只是聊天: + +
+ +
Grok 4.6 通过 Token Station 路由,在 Cursor 的 Agent 模式下直接编辑一个文件。
+
+ +## 步骤 3:定义范围明确的 subagent + +和姐妹篇文章里一样的两个 subagent,一个只读的研究者,一个测试验证者,在这里的用法完全相同。关于为什么 `model:` 字段不会真的让 subagent 路由到另一个模型,以及我们为什么最终选了这两个名字,完整细节见 [Claude Sonnet 5 和 Haiku 那篇文章](/blog/route-cursor-through-token-station-zh.html);这里只写简化版。 + +**`.cursor/agents/bill-the-explorer.md`** +```markdown +--- +name: bill-the-explorer +description: Searches and reads the codebase to answer questions about existing code. Use proactively before implementing anything unfamiliar. +model: inherit +readonly: true +--- + +You are a fast, read-only research agent. Find and summarize relevant +files, functions, and patterns. Never edit files or run mutating commands. +``` + +**`.cursor/agents/jill-the-test-runner.md`** +```markdown +--- +name: jill-the-test-runner +description: Runs the test suite and reports pass/fail results with failure details. Use proactively after any code change. +model: inherit +--- + +You run the project's test command, capture output, and report which +tests passed or failed and why. Do not modify source files. +``` + +这里我们明确用 `model: inherit`,而不是指定某个具体模型,因为 Cursor 的 Task 工具目前不会遵循 subagent 里指定的自定义模型,不管写什么,它们都会运行在主对话当前使用的模型上(在这套配置里就是 Grok 4.6)。用 `inherit` 直接说明这一点,而不是暗示一个其实并不存在的成本分层。 + +创建这两个 subagent 的过程和姐妹篇文章完全一样,所以直接复用那段录屏: + +
+ +
创建 bill-the-explorer 和 jill-the-test-runner 两个 subagent。
+
+ +同样值得从姐妹篇文章里重复一遍:给 subagent 起名时避免和 Cursor 自带的某个 agent 撞名。`explore` 就是一个真实存在的内置名字,会被悄悄路由到那个内置 agent 而不是你自己的定义,也没有任何报错来解释原因。`bill-the-explorer` 和 `jill-the-test-runner` 避开了这个问题。 + +## 自己试试看:同样的 httpie 任务 + +我们用 Claude Sonnet 5 跑过一次完整的会话,把研究和验证工作委派给这两个 subagent,针对 [httpie](https://github.com/httpie/httpie) 的一个真实功能:把跟随重定向后实际到达的 URL 加进 httpie 的 `--meta` 输出里,放在已有的耗时字段旁边。那次会话和录屏都在姐妹篇文章里。 + +我们还没有用 Grok 4.6 作为主模型跑过这个带 subagent 委派的完整多步骤会话,所以这一节还是"自己试试看",而不是一份关于这个具体任务实际发生了什么的报告。上面已经确认的是:Grok 4.6 可以通过 Token Station 应用真实的 Agent 模式文件编辑,所以已经没有根本性的理由认为完整任务会失败。事实证明,显式调用才是触发 subagent 委派的可靠方式;用大白话说"用 explore subagent"并不会真的发生委派。同样的三条消息序列,原封不动,值得在选中 Grok 4.6 时试一遍: + +**消息 1**,委派研究工作: +``` +/bill-the-explorer find how elapsed time is computed and displayed in HTTPie's --meta output, and identify where to add the effective URL, the URL actually reached after following any redirects, alongside it. +``` + +**消息 2**,研究结果出来后,回到主 agent: +``` +Using what bill-the-explorer found, add the effective URL next to the existing elapsed time in HTTPie's --meta output. Add a test that confirms it works for both a redirected and a non-redirected request. +``` + +**消息 3**,委派验证工作: +``` +/jill-the-test-runner verify the new effective-URL test passes, along with the rest of the test suite. Report any failures separately from the two known pre-existing Big5 charset-detection failures in tests/test_encoding.py, which are unrelated to this change. +``` + +单步的 Agent 模式编辑已经确认可行;这个序列真正要测试的是,带真实 subagent 委派的完整"研究-实现-验证"流程,是否也能像 Claude Sonnet 5 那样在多步骤会话里稳定跑通。 + +## 目前能用的 + +Chat 模式和 Agent 模式下,Grok 4.6 通过 Token Station 在 Cursor 里都能用:真实的回复、真实的文件编辑,正确计入你的 Token Station 密钥,并显示在控制台里。注册 provider 和定义 subagent 的过程和 Claude 配置完全一样,因为这些都和你添加的是哪个模型无关。 + +这让 Grok 4.6 和 Claude Sonnet 5 一样,成为能通过 Token Station 可靠驱动 Agent 模式编辑的路由,而这对每个模型家族来说并不是理所当然的:早些时候的测试发现,Token Station 的 GPT-5.6 路由(Sol、Terra、Luna)在 Agent 模式下能读取和讨论代码,但始终无法真正应用文件编辑,这是 Token Station 一侧的工具调用响应格式问题,而不是 Cursor 的硬性限制,目前支持工作正在推进中。工具调用的兼容性最终被证明确实是因模型和 provider 而异的,所以 Grok 在这里是凭自己的实测证据被确认的,而不是简单地类比 Claude 就假定成立。 + +目前还没测试过的,具体来说,是把研究委派、实现和验证委派都串起来、针对一个真实任务、以 Grok 4.6 作为主模型的完整多步骤会话。支撑它的单步编辑能力已经确认;端到端的完整流程就是上面那个"自己试试看"。 + +subagent 层面的模型路由和姐妹篇文章里描述的限制一样,不管你用哪个模型都是如此:Cursor 的 Task 工具只接受 `inherit` 或它自己的 `composer-2.5-fast`,所以 subagent 总是运行在主对话所用的模型上。这是 Cursor 平台本身的限制,不是 Grok、Claude 或 Token Station 特有的问题。 + +## 开始使用 + +前往 [models.bytefuture.ai](https://models.bytefuture.ai/signup) 注册:1 美元免费额度,无需信用卡,首次充值最高可再获得 50 美元奖励。导出你的密钥,接入 Cursor 的 Models 设置,添加 `xai/grok-4.6`。 + +[试用 Token Station](https://models.bytefuture.ai/intro.html) diff --git a/src/content/writings/zh/route-cursor-through-token-station.md b/src/content/writings/zh/route-cursor-through-token-station.md index b472f42..b8726ad 100644 --- a/src/content/writings/zh/route-cursor-through-token-station.md +++ b/src/content/writings/zh/route-cursor-through-token-station.md @@ -4,7 +4,7 @@ lang: "zh" title: "在 Cursor 中接入 Token Station:Claude Sonnet 5 和 Haiku" summary: "Cursor 在设置里的 Models 面板支持自定义 OpenAI 兼容 provider。把它指向 Token Station,Claude Sonnet 5 和 Haiku 就会作为可选模型出现,并且完整支持 Agent 模式:真正的文件编辑,不只是聊天,还带有用于委派研究和验证的专门 subagent。" category: "tutorial" -date: "2026-08-21" +date: "2026-08-26" cta: "https://models.bytefuture.ai/intro.html" cover: "blog/route-cursor-through-token-station-cover.png" draft: false @@ -12,6 +12,8 @@ draft: false Cursor 在 Settings → Models 里支持自定义 OpenAI 兼容 provider。把它指向 Token Station 的端点,就能把 Claude Sonnet 5 和 Haiku 添加为可选模型,全部通过你自己的 Token Station key 计费。和 Token Station 上的其他一些模型家族不同,这两个模型完整支持 Cursor 的 Agent 模式:真正的文件编辑,不只是聊天。下面是完整的配置流程,包括我们自己踩过的一个命名坑,最后还会跑一次真实的编码会话:Sonnet 5 在一个开源项目里实现一个真实功能,把研究和验证工作委派给两个专门定制的 subagent。 +在开始配置之前,有必要说清楚为什么要通过 Token Station 来路由 Cursor,而不是直接付费给 Cursor。有三个具体的理由。Cursor 的 Pro 计划把一部分模型(Grok 4.6、Grok 4.5、Composer 2.5)打包进一个共享的月度用量池,其余模型则从另一个池子里按各自的 API 价格计费,但这两个池子都不会给你一份按模型、按请求拆分的实际花费明细。Token Station 的 key 会绕开这两个池子:BYOK 请求直接发往 Token Station 的端点,完全不经过 Cursor 自己的计费,会按 provider 的真实费率、零加价,显示在你自己的控制台里。第二,如果 Cursor 只是你使用的多个编码工具之一(比如同时还用 Claude Code、Codex 或 OpenClaw),同一个 Token Station key 和同一批模型 ID 在所有这些工具里都能用:只需要一个账户、一个余额去追踪,而不必给每个工具单独准备 key、单独充值、单独对账。第三,Token Station 的模型目录已经超过 300 个模型、来自 30 多家 provider,远远超出 Cursor 自己打包进那些用量池里的范围。 + ## 开始之前需要准备什么 - 已安装 Cursor([cursor.com/download](https://cursor.com/download))。 @@ -145,7 +147,7 @@ subagent 在角色划分和权限控制上是能用的,`name`、`description` 早些时候对 Token Station 的 GPT-5.6 路由(Sol、Terra、Luna)的测试发现,Agent 模式下它们能读取和讨论代码,但始终无法真正应用文件编辑,这是 Token Station 一侧的工具调用响应格式问题,而不是 Cursor 的硬性限制。对这几个路由的支持正在推进中。如果你现在就需要一个能在 Cursor 里可靠编辑文件的编码 agent,请使用 `anthropic/claude-sonnet-5` 和 `anthropic/claude-haiku-4-5`,而不是 GPT-5.6 系列。 -Token Station 的 xAI 路由 `xai/grok-4.6`,也可以通过同样的自定义 provider 设置在 Cursor 里使用,如果你想让 Grok 来担任主力编码模型的话。 +Token Station 的 xAI 路由 `xai/grok-4.6`,也可以通过同样的自定义 provider 设置在 Cursor 里使用,如果你想让 Grok 来担任主力编码模型的话。具体配置见姐妹篇文章:[在 Cursor 中运行 Grok 4.6](/blog/route-cursor-through-token-station-grok-4-6-zh.html)。 ## 开始使用