Commit Graph
21 Commits
Author SHA1 Message Date
yetoneandggbdpq 7e5a54147f gateway: a routing group's intent sureness is its own, intent-sure= (#5101)
Jev's sure of an intent had to reach jevSure, a fixed 0.4, for every
group. zminds measured 39 of 237 turns in one day (16.5%) refused at sure
0.153 to 0.395, and those turns went by the group's routing as if it had
no intent rules. A group can now set its own threshold: intentSure, from
0 (take Jev's likeliest intent however unsure) to 1. Missing keeps 0.4.

readJev keeps Jev's likeliest intent, its sure and Topic (an answer of
intents rather than levels). ruleFor applies the group's own sure through
intentOf, so two groups sharing one classifier and its cached answer each
judge it at their own. "none of these" is never an intent, at 0 too.
Levels and effort are as before.

Set from a terminal: magpie group set <group> intent-sure=0.25, empty to
unset. SaveGroup and the CLI refuse a value outside 0 to 1, NaN too: the
patch's `v < 0 || v > 1` let intent-sure=NaN through the CLI, which
SaveGroup then failed on as "json: unsupported value". cloneGroups copies
the new pointer, since TestCloneGroupsSharesNothing went red on it.

Changed from ggbdpq's patch on #5101:
- The group editor's "Intent sure" row is left out. Its hints were long
  secondary text, it showed for every classifier when only Jev answers
  with a sure, and it had no GUI test. The Routing page instead carries
  intentSure through each save it makes of a group (the editor's Save,
  the routing menu, the manual pick), so a value set from the CLI isn't
  wiped by the next GUI save.
- Its i18n strings and site/public/docs/intent.html are left out. A
  site/ change waits for the maintainer (docs/contributors.md). The site
  diff was documentation text only: a paragraph id="sure", a sentence
  in "Match the rules" and one table row. It had no links or scripts.
- docs/subsystems/gateway-routing.md has a bullet for IntentSure.

Run on mote (mote-run):
- gofmt -l internal/: clean.
- go vet -tags nogui, also with GOOS=linux and GOOS=windows, on
  internal/gateway, internal/cli and internal/provider: clean.
- go test -tags nogui -run 'TestGroupIntentSure|TestJev|Rule|Classif|Decide'
  ./internal/gateway: ok.
- -run 'Group|Apply' ./internal/cli: ok.
- -run 'Group|Save|Clone' ./internal/provider: ok.
- go test -run Budget ./internal/gui: ok.
- node --test group-intent-sure (new), routing-group-strategy and
  group-first-token, in Chromium and WebKit: 42 pass, 0 fail.
- i18n-keys has one red, "a plugin's words are its own". It fails the
  same on origin/main b712adb84 and is filed as #5327, #5332 and #5426.
  i18n-en-no-cjk: ok.

Broken by hand, each red, then restored:
- sureNeeded always returns 0.4: TestGroupIntentSureThreshold,
  ZeroTakesTheArgmax and IsPerGroup FAIL.
- The patch's `< 0 || > 1` checks put back: TestGroupIntentSurePairs
  FAILs on "NaN" and "nan"; TestGroupIntentSureRange FAILs on NaN.
- The cloneGroups copy removed: TestCloneGroupsSharesNothing FAILs.
- The editor's Save sending intentSure null: group-intent-sure FAILs 4/4
  ("the editor's Save keeps it").
- The routing menu's pick sending null: it FAILs 4/4 ("a routing pick
  keeps it").

Not tried: a real Jev account with a group at 0.25; the full suite.

Co-authored-by: ggbdpq <ggbdpq@gmail.com>
2026-11-06 10:44:24 +08:00
Yang Yu a1cce7faa1 gateway: the decision model's timeout is a setting (#2934, reyoung)
A routing group's intent classifier (askChat) and System One (askJev)
were each given a fixed 8s. A slow subscription classifier can now be
given longer in Settings > Models > Replies > Intent classifier timeout.
settings.json's classifyTimeout takes 1..60 seconds; 0 or missing keeps
8s. save() refuses below 0 or above 60, and ClassifyWait clamps a value
edited by hand (below 1 gives 8s, above 60 gives 60s). A settings file
that can't be read gives Shared()'s defaults, so 8s, never no timeout.
Both askChat and askJev read it per call. The GUI row is the app's own
segmented control (8, 15, 30, 60, plus a value set by hand), and other
saves carry the value on (prefsKeep, api.go). zh, zh-TW, ja and de
strings; the routing reference and the en, zh, ja docs say it.

Ported from reyoung's classify-timeout-2934 (author kept). On top:
- askJev's defer reworded any error once ctx had expired, so a refusal
  (decideRefused) or an answerError read as the wait ran out lost the
  type askDecideTries rests an account by. Now only errNoAnswer, which
  systemOne returns when postDecide failed with ctx done, is reworded
  to "<provider> gave no answer in <wait>".
- ja intent.html: a stray space in "遅いモデルだと 設定した".
- app.js: the Image generation timeout row and the new row share
  waitRow (~350 bytes less). TestCoreScriptBudget was red (app.js
  1,337,982 > 1,337,000); budgets raised to the exact sizes, app.js
  1,337,633 and core 1,529,393, no room added.

Run (macOS, Go env pinned, sandbox HOME):
- Full go test -tags nogui -timeout 45m ./... at 766cf1cf9: 68 packages
  ok; internal/gui red on TestCoreScriptBudget only, fixed above.
- At ed008ca9f and again after rebasing on 65e80405b: internal/gateway,
  internal/settings, internal/gui ok; gofmt -l clean; go vet (darwin),
  GOOS=linux go vet -tags nogui, GOOS=windows go vet all ok.
- Whole GUI suite at ed008ca9f, chromium and webkit, 4 wide at load
  ~30: 11,930 tests, 52 red, none in the files this change reaches
  (classify-timeout-setting, image-timeout, i18n-keys all pass). The
  red files rerun alone: 44 red in 10 files, the same 44 on origin/main
  65e80405b. All have issues (#2228, #2399, #2150, #2448, #2276, #3091,
  #2549, #2163, #3099, #3104) except library-mcp-health-wsl's ja case,
  filed as #3350.

Broken by hand, each red then restored:
- classifyTimeout fixed at 8: TestClassifierTimeoutSetting and
  TestJevGivenTheClassifierTimeout red.
- askJev fixed at 8: TestJevGivenTheClassifierTimeout red.
- save()'s bound removed: TestClassifyTimeoutKeptAndBounded (-1
  accepted) and TestSettingsClassifyTimeout (61 gives 200) red.
- ClassifyWait's clamp removed: red (600 waits 10m0s).
- api.go's keep removed: TestSettingsClassifyTimeout red.
- prefsKeep's classifyTimeout removed: the GUI test's "sent on with
  other saves" red in chromium and webkit.

Not tried: a real slow classifier or account; Linux and Windows at
run time; the native Linux desktop build; a test that pins the askJev
refusal-at-deadline race (it is timing-only, so no deterministic red
was written for it).
2026-10-23 15:03:08 +08:00
yetone 8ef14be3e6 gateway: an effort=auto group leaves a turn the agent sent with reasoning none alone and asks no classifier, so its pick and what went out agree (#2247, sryimnoob123)
The classifier's pick was recorded but never applied when the agent asked for none, costing a classifier call per turn. The outer effort in the routing record is what the agent asked; the effort sent is tries[].effort on the try marked picked:true, which the groups help now says. Thanks to ggbdpq for the reproduction.

Run at this head (on 6485056e1, with the #2245/#2246/#2247 fixes together): gofmt -l clean; go vet ./... for darwin and windows, and linux -tags nogui; the full go test ./... in a sandbox HOME, all green. The new test fails on the old code and passes with the fix.
2026-10-15 04:46:57 +08:00
Versun 0bb0781ea0 gateway: a group with one intent rule is classified by Clef, and one intent is never taken for a level (Versun) (#1325)
With one intent rule and a Clef classifier (@cf/cloudflare/clef or
clef-flash), every turn's classification failed. jevBody always asks the
"level" choice, whose options are the intents alone, and Workers AI turns
away a choice of fewer than two options: 422 "questions: Dictionary should
have at least 2 items after validation, not 1". The field it names is
misleading: a request of one question is accepted (a lone noul, score, or
two-option choice each answered 200). The rule never matched and the turn
went down the group's order, with only the trace saying why. Jev accepts a
one-option choice, so it went unseen there.

One intent is no scale either. jevLevelled asked about it anyway, and Clef
Flash called a single kind a level at 0.58; readJev then reads the
one-option level answer, so once the 422 is gone the rule would match every
message. askJev now asks whether the intents are levels only when there are
two or more, and jevBody asks the level question only then: one intent is a
topic, a message may be none of it, and "none of these" stands. Two or more
intents, and the effort question, are asked as before.

Tests:
- TestClefOnCloudflare's fake Clef turns away a choice of fewer than two
  options with Workers AI's real 422 body. Without the jevBody change it
  fails with the classifier error above.
- TestJevLevels adds one intent that Jev calls a level: "none of these"
  stands, picking it matches the rule, and no levels call is made. Without
  the askJev change it fails: `one kind picked: ... Intent: ..., 3 calls`.
- TestJevOnVercelTypeSafe, TestJevOnVercel and TestJevOnCloudflare check
  the levels call on the wire (Vercel's noul as a boolean, Cloudflare's
  account looked up once), so each gets a second intent to keep asking it.

Verified on macOS (go1.26.8, temp HOME, Go caches pinned): go vet -tags
nogui ./...; go build, GOOS=linux go build -tags nogui, GOOS=windows go
build; go test -tags nogui ./...; go test -race -count=20 on the tests
above; gofmt -l clean. Against the real Clef: a nogui build in a temp HOME
on 127.0.0.1:3499 with a one-intent group and @cf/cloudflare/clef as its
classifier. Before, both turns' classifier error is the 422. After, "hi,
how are you?" matches at 0.97 and a refactor request is "none of these" at
0.94.
2026-10-13 09:59:15 +08:00
yetone 60808fd9cf usage, gateway, gui: magpie's own requests are told apart from the agent's, and a classifier on a subscription says it asks it every turn (#1839)
kensenzhao saw a subscription's allowance spent by requests the agent
didn't make: a routing group's classifier, set to a subscription's model,
asks it as every turn begins, and those calls looked like the agent's own.

What changed
- usage.Group has an own share (calls, tokens, cost) of the calls magpie
  made by itself, filled for models, keys and accounts. Record.ByMagpie
  is the test: agent "magpie", or one of its own User-Agents
  (magpie-router/1, magpie-search/1, magpie-vision/1) where the agents
  aren't loaded. The calls still count in the group's totals, as they
  went to the same key or account. A group with none sends no "own".
- The classifier's calls are Kind "routing": callKind marks RouterAgent's
  requests, and the decision model's record (Jev / System One) is written
  with it. A "Routing classifier" purpose names them in the ledger.
- Usage page: magpie's row among the agents and its ledger rows carry a
  "magpie's own" mark; an account's, key's or model's row adds "{n} by
  magpie itself"; an account's card says how many of the period's
  requests were magpie's own, drawn again once the summary arrives after
  the allowances.
- Routing page: /api/groups marks a model a subscription account serves
  (modelRef.Sub, servedRef). Beside a classifier on such a model, or a
  group whose first member is one, the editor says every turn starts
  with a request to that subscription, two when it picks both intent and
  effort in words. A classifier on a key or a free model says nothing.
- New strings in zh, zh-TW, ja and de. The mark is a muted chip with an
  even border all round (no left stripe).

Tests
- TestSummaryCountsMagpiesOwnCallsApart, TestByMagpie (usage).
- TestIntentRoutesATurn and TestJevPicksTheIntent (gateway) now check
  the classifier's records are Kind routing and magpie's own, and the
  agent's records are not.
- TestServedRefSaysASubscription (gui).
- own-requests.test.cjs: Chromium and WebKit, 1100 and 390 wide,
  en/zh/zh-TW/ja/de, the API faked; no click scroll, no sideways page.
- Broken by hand, each turned its test red: addOwn counting nothing;
  callKind's routing case removed; decide.go's Kind blanked; the ledger
  mark, the agents' mark, the "{n} by magpie itself" line, the card's
  line, its redraw after the summary, the Routing hint, its group case
  and modelRef.Sub each removed.

Run: gofmt -l; go vet on darwin, linux -tags nogui and windows; go test
for usage, access, catalog, gui (-tags nogui) and gateway in full; the
GUI tests above, the ledger, routing-intent and translation tests.
Not done: the warmups (warmClaude/askClaude) write no usage record at
all, so they can't be marked; that is left as it was. Not tried with a
real subscription classifier against a live account.
2026-10-13 01:41:50 +08:00
yetone a94cc3c950 provider: Workers AI's decision models (Jev, Clef) are tested from their right-click as System One's are (ARNO on Discord: cloudflare-jev provider模型无法右击测试) — a model test of a cloudflare-jev provider said its models couldn't be tested, since the test sent System One's question as it is and Workers AI wants it wrapped. DecideAsk and DecideAnswer move from the gateway to the provider package, and AskSystemOne (which TestModels uses) now wraps the question for the provider's API and reads the answer out of Cloudflare's envelope, as routing's own decisions do: Jev is asked {model, input}, a Clef at /run/@cf/cloudflare/<clef> with its own model selector. TestCloudflareDecideModelsTested (an httptest Workers AI: both models pass, the bodies are each one's, a refused key fails) fails on the old code; TestModelTest's cf case now expects testable. go vet, builds (darwin, GOOS=linux nogui, GOOS=windows) and go test -tags nogui -count=1 ./... under a temp HOME pass (TestProvidersAnswerWhileListsComeIn flaked once, passes alone). 2026-10-04 22:22:23 +08:00
yetone ee3fca6375 decide: Cloudflare's Clef and Clef Flash are offered on Workers AI beside Jev (ARNO on Discord: cloudflare workers-ai 现在有了新的 decision 模型) — Workers AI now serves Cloudflare's own decision models, @cf/cloudflare/clef (27B) and @cf/cloudflare/clef-flash, which answer System One's questions as Jev does. The cloudflare-jev provider (now named Cloudflare Workers AI · Jev, Clef) lists them beside typesafe/jev, so a routing group can pick either as its classifier (cloudflare-jev/@cf/cloudflare/clef), and magpie's System One API routes to them by name. Each is asked at its own run (…/ai/run/@cf/cloudflare/clef), with the request as it is and its model named clef or clef-flash, as Cloudflare's docs give it; Jev is still a run of typesafe/jev with the questions as its input, and stays the default. TestCloudflareClef (offered, routed, each one's URL, a Clef id outside Workers AI no decider) and TestClefOnCloudflare (a group classified by Clef Flash through Workers AI) fail on the old code. go vet, builds (darwin, GOOS=linux nogui, GOOS=windows) and go test -tags nogui -count=1 ./... under a temp HOME pass. Not tried against Cloudflare: no Workers AI key in the owner's config. 2026-10-04 21:52:11 +08:00
XYenonandAmp 564f8782c7 provider: keep conversation models on mixed decision providers (#609)
Distinguish decision-only providers from gateways that also serve conversations. Only Jev models use the decision API; ordinary models remain in the catalog, automatic groups and conversation routes. Keep the full model cache when probing a mixed provider’s decision endpoint, and allow conversation model tests in its editor.

Verified with go vet -tags gtk3 ./..., go test -tags gtk3 ./..., node --check internal/gui/assets/app.js, and an isolated browser fixture.

Amp-Thread-ID: https://ampcode.com/threads/T-01a0fe05-afd7-70df-97cf-fdb69c4f4680

Co-authored-by: Amp <amp@ampcode.com>
2026-10-03 04:06:02 +08:00
yetone 55e7df478f codex: a group's effort for the turn keeps Codex's reasoning.context, and Codex's custom tools (code mode's exec, apply_patch) reach a model magpie translates for (#534, #520 follow-up, azir12345: since v0.1.637 a Plus account's gpt-6.1-sol fails with 400 "X-OpenAI-Internal-Codex-Responses-Lite requires reasoning.context to be all_turns", and Codex said it had only the collaboration and wait tools, no terminal) — ChatGPT's catalog marks gpt-6.1-sol (as gpt-6-sol, gpt-6-luna, gpt-5.6-*) use_responses_lite with tool_mode code_mode_only, and Codex asks for the bare slug with its native metadata: the X-OpenAI-Internal-Codex-Responses-Lite header (add_responses_lite_header, which magpie forwards with the other x-openai-* headers), reasoning {"effort","summary","context":"all_turns"} (build_reasoning), and its tools moved into an additional_tools item, every other tool reached through exec, a custom (freeform, lark grammar) tool in the "functions" namespace, beside wait and the collaboration namespace. magpie routes the bare id to the group auto-gpt-6-1-sol, and the effort the group picks for the turn went through withEffort, whose Responses branch rebuilt reasoning as {effort, summary} and dropped context, so ChatGPT refused the Lite request; it now sets only the effort (withBodyEffort), keeping every other field of reasoning as Codex sent it. A member served by translation (Chat, Anthropic, a Responses plugin) had parseResponses drop custom tools and ignore custom_tool_call / custom_tool_call_output items, so exec vanished and the model saw only wait and the collaboration tools; a custom tool (top-level or in a namespace) is now offered as a function taking one string "input", its description its own plus a note on input and its grammar, an earlier custom_tool_call goes to the model as a call with {"input":…} and its output as the call's result, and the model's call goes back to Codex as the custom_tool_call it runs (name and namespace as Codex knows them, input from the "input" argument, else the arguments as given), streamed without function_call_arguments events and in the non-streamed reply alike. This also gives translated models Codex's freeform apply_patch, which was dropped silently before. The Lite header is still forwarded as it was; nothing showed it needs dropping. Codex's base_instructions and identity line are untouched. No request was made to ChatGPT. TestWithEffort's Lite case fails without the decide.go change ("want \"context\":\"all_turns\""); TestCodexCustomToolsTranslated (a code-mode Lite turn through a fake Chat provider: exec offered with input and its grammar, the earlier call and output shown, the model's exec call back as a custom_tool_call with its input and no arguments) and TestCodexCustomToolNamespaced (namespaced and non-JSON calls, renderResponses) cover the tools; TestAdditionalToolsTranslated, TestNamespacedToolsOffered and TestGrokPluginGetsNamespacedTools now expect the custom tools offered. go vet ./internal/..., go build -tags nogui (darwin, GOOS=linux), GOOS=windows go build, go test -tags nogui -count=1 ./... under a temp HOME pass (TestDevinSignedInOnlyInMagpie failed once on its wait, passes alone; untouched). 2026-10-02 15:59:14 +08:00
yetone 8dbdcfc8b3 gateway: a Claude subscription's turn at another effort goes on in the same Claude Code, told the level, and reads its cache (#502: 经过意图路由判断改变了推理强度后,好像缓存全部要重新写入) — a router switching Opus 5.5 from high to low and back wrote the whole conversation to the cache each time (427,987 and 429,792 tokens written, 26,107 read, $2.18 and $2.20 a turn)
A Claude subscription is served through a Claude Code run that keeps the conversation for its next turn, started with --effort. The run waiting for that turn was found by turnKey, which hashed the effort: a turn the router picked another level for missed it, retire let it go, and a new Claude Code was told the whole conversation in one message, a prefix the cache had never seen (as #463 for a run let go too soon). turnKey now holds only whether an effort was asked for, and resume tells a waiting run a new level before its turn with the control request Claude Code's SDK sends for applyFlagSettings ({"type":"control_request","request":{"subtype":"apply_flag_settings","settings":{"effortLevel":"low"}}}); its control_response is read past like any other line that isn't a stream event. Checked against Claude Code 2.1.287 under a sandbox HOME and a local fake Anthropic endpoint (no real API call): started at --effort low and told high, get_settings answers applied effort "high", and the two upstream requests differ only in output_config.effort (system, tools, thinking {"type":"adaptive"} identical; the history is the same apart from where cache_control sits), which is what lets Claude Code keep its cache across a level change. A run started without an effort and a turn with one (or the reverse) still get separate runs, as --thinking-display is only set with an effort.

API-key and Responses upstreams already kept the prefix: withEffort changes only output_config.effort for an adaptive Claude (thinking left as it is) and only reasoning.effort for the Responses API (instructions, tools, input and prompt_cache_key untouched, Codex's instructions not involved), which TestWithEffortKeepsTheCachedPrefix now guards. TestClaudeRunKeptAcrossEffort (a fake claude logging its stdin) fails without the change (a second process for the turn at low) and passes with it: one process, the control request before the second turn, none for a third at the same level. go vet ./internal/..., go build -tags nogui ./... (darwin, GOOS=linux), GOOS=windows go build ./..., go test -tags nogui ./... pass (internal/gui's TestFXInState failed once in the full run and passes alone and with its package; untouched here).
2026-10-02 11:29:02 +08:00
Zhu Wang 1adb2b571e feat(routing): group requests by session with names and estimated costs (#396)
* feat(routing): group requests by session with names and estimated costs

* fix(routing): address session view review feedback

Preserve Luna Reserve and other header fallbacks for ordinary Codex turn metadata; reuse metadata and the kind across trace and native accounting. Default to By request and persist the grouping choice. Store only token accounting fields in route history while retaining legacy JSON compatibility.

Add regressions for helper precedence, native kind accounting, history compatibility and grouping preferences.
2026-10-01 20:50:15 +08:00
yetone b9895c2ded tests: the gateway's and Devin's tests run on Windows in a home of their own — on Windows os.UserHomeDir reads USERPROFILE, not HOME, so a test that set HOME to a temp dir still found the one USERPROFILE every gateway test shares (and the box's real agents); Devin's CLI keeps its sign-in under APPDATA. Each such test now sets USERPROFILE with HOME (setHome), TestDevinOwnMovesWithPlan sets APPDATA, and the tests whose Claude Code is a shell script skip on Windows, where it can't run and the box's real claude ran instead. Tests only. The gateway suite and TestDevinOwnMovesWithPlan pass on Windows; go test -tags nogui ./... passes on macOS. 2026-10-01 20:26:53 +08:00
Aliceandraper 02d501894b usage: link request accounting to routing history (#361)
Co-authored-by: raper <raper@raperdeMacBook-Air.local>
2026-10-01 16:18:02 +08:00
drunkduckdrown ae9b3ecdcf decide: send a gateway's own Jev name; ambiguous unfetched is 400 (#207)
Vercel and Cloudflare each serve one Jev, as typesafe-ai/jev and
typesafe/jev. jev-latest is that model, rewritten to the name the
channel lists; jev-preview is not on the channel and is 400.

A bare jev-latest with two providers that have not fetched a list
used to 404 (listed empty, then no single provider to alias). Both
would take it, so it is 400 "more than one" as when the lists are in.

usage.Append still fills Requested and Served on systemOne and
serveSystemOne.

Tested with TestRouteDeciderVercelAlias (preview refused, own name
kept), TestRouteDeciderCloudflareAlias, TestRouteDeciderUnfetchedAmbiguous.
2026-09-29 23:26:25 +08:00
yetone 7353323382 routing: Jev is told what each level is for (我用 jev 作为意图判断模型的时候「写个纸牌游戏」为啥会被识别为简单任务) — intents that are levels (简单任务 / 复杂任务) went to Jev as bare names, and a short message left it torn: 写个纸牌游戏 came out 复杂任务 at 0.62 with no turn before, too unsure to hold, and 简单任务 at 0.57 after a 简单任务 turn, so the turn before's level stood. Now the call that asks once per set of intents whether they are levels also asks, per level, how much work a request at it is (a score over four tiers: little, some, much, the most work — a new program, app or game), and each tier goes to the level rated nearest it; the level question then gives each its place (lowest, highest, level k of n) and its tiers, and says to judge the work asked for, not how short the message is. Still one extra call per set of intents, cached. Checked against Jev itself: 简单任务 0.03, 复杂任务 2.32; 写个纸牌游戏 复杂任务 at 1.0, and 0.99 after a 简单任务 turn; 修个错别字 and 解释一下这个函数 简单任务 at 1.0, 继续 at 0.94. Unrated levels keep bare names as before 2026-09-29 01:36:32 +08:00
yetone 571766e6ff provider: Jev on Vercel is asked at its TypeSafe API, and on Workers AI at the account the endpoint names (ARNO: Vercel Jev 的默认端点为什么不是 https://ai-gateway.vercel.sh/typesafe;Cloudflare 官方写的是 …/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/run,当前默认端点好像没起作用) — Vercel's preset now points at https://ai-gateway.vercel.sh/typesafe, its documented TypeSafe-compatible API: System One's own request and answer at /v1/systemone with typesafe-ai/jev, the key checked by /v1/models; …/typesafe/v1, …/v1/systemone and the bare host are taken for it, and a saved /v4/ai base keeps the AI SDK evaluation-model protocol it used (ViaVercelEval). Workers AI takes the address Cloudflare's docs give — an endpoint with /accounts/<id> in it, /ai/run after it or not, is asked there as it is and its key checked by that account's /ai/models/search, since a token made for Workers AI alone may not list /accounts; a placeholder ($CLOUDFLARE_ACCOUNT_ID) is looked up as before, and a token /accounts refuses is told to put its account ID in the endpoint 2026-09-28 19:14:49 +08:00
yetone a1ca00d31b routing: a request shows the reasoning its model was actually sent at (显示意图路由实际的推理强度 #144) — the trace keeps the effort the agent asked for and, on each try, the one sent upstream after the turn's pick and fitting to the model's levels (picked marks the turn's pick), so the Routing list reads "Fake · m-big · high", its tooltip says what the agent asked for, and the request's story adds "The turn's pick replaced the medium Codex asked for."; usage.jsonl records the sent effort too, and the Usage session list shows where magpie routed a session's calls and at what reasoning ("→ m-big · high +1", with a Routed line per model and effort in its detail) 2026-09-28 18:11:58 +08:00
yetone de59782fba providers: Jev through Vercel's AI Gateway and Cloudflare's Workers AI — two presets, Jev · Vercel AI Gateway and Jev · Cloudflare Workers AI, route groups and pick their effort as TypeSafe's own does, each asked its own way: Vercel's evaluation-model with the model in a header, a noul asked as a boolean and a confidence taken from the probabilities; Workers AI's run of typesafe/jev at the account its API token works in, found once, out of Cloudflare's envelope. A key is checked by the gateway's free call (Vercel's credits, Cloudflare's accounts) 2026-09-28 01:43:09 +08:00
yetone 0f59ca2fc0 routing: a turn a rule sent to one of a group's models stays on it for its tool rounds when another member is on the same account — the conversation was kept to the account that answered, so its next request went to that account's first member: Claude Code's turn Jev sent to codex/gpt-5.5 had its tool results answered by claude/claude-sonnet-5, both served by one provider (as Opus and Sonnet on one Claude sign-in are). And a group whose intents are levels has every turn at one of them however torn Jev is: 继续,再加一个基准测试 after a 复杂任务 came out 0.54 to 0.46, below the confidence counted, and went to the group's first member; a torn turn now stays at the level of the one before, or takes the likelier. Tested with Claude Code through Jev and the real Claude and ChatGPT subscriptions 2026-09-27 02:25:24 +08:00
yetone f2b88ad5b4 jev: a group whose intents are levels has every message in one of them — Jev is asked once per set whether the kinds are levels (a noul, kept), and for such a set each turn is read from a choice among the kinds alone, as with a "none of these" option it put 你好 in none; Jev is also told the kind and the reasoning of the turn before, so 继续 after a 复杂任务 stays complex at its effort. Tested live against System One and OpenRouter: 你好 → nano/low, a deadlock analysis → mini/high (xhigh capped), 继续 → mini, 你是谁 after it → nano/low, Claude Code and Responses requests → the effort picked is what is sent 2026-09-27 01:53:04 +08:00
yetone 6fd85894ea routing: Jev (TypeSafe's System One) as a group's classifier — asked once as a turn begins which of the rules' intents the message is, with how sure it is, and, for a group with effort auto, how hard the turn is to think about; the turn's requests then ask their model for that reasoning, where the agent asked for any. TypeSafe is a decision provider: it serves no conversation and is no group's member 2026-09-27 01:53:04 +08:00