Skip to content

fix(router): learn from real token counts, show hedges, price in thinking tokens - #358

Merged
ralyodio merged 1 commit into
masterfrom
fix/router-live-tuning
Nov 12, 2026
Merged

ralyodio merged 1 commit into
masterfrom
fix/router-live-tuning

Conversation

@ralyodio

Copy link
Copy Markdown
Collaborator

Tuning from the first live routed calls after #356. Details in the commit message. Router tests 20/20 and glue tests 6/6 pass (vienna).

🤖 Generated with Claude Code

…king tokens

From the first live routed calls (2026-11-12):
- Infernet reports usage 0: treat 0 as unknown and estimate, so cost and
  per-token speed are learned (a 14B call took 108 s, router guessed 11 s)
- a hedge records its own step when it fires (the aborted loser settled
  after the receipt was built and vanished from it)
- thinking models (qwen3) count 3x output tokens outside math/reasoning:
  qwen3:4b spent 200 s reasoning about three primary colors
- one slow sample (cold model load) is capped at 400 ms/token

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

ThreatCrush Security Scan

17 finding(s)

HIGH/CRITICAL: 1 | MEDIUM: 12 | LOW: 4

Severity Rule Location
HIGH js-ssrf-outbound-request apps/web/public/sw.js:24
MEDIUM js-unescaped-html-sink apps/web/src/app/blog/[slug]/page.tsx:53
MEDIUM js-unescaped-html-sink apps/web/src/app/layout.tsx:109
MEDIUM sql-template-interpolation apps/web/src/lib/chat/convo-store.ts:116
MEDIUM sql-template-interpolation apps/web/src/lib/chat/convo-store.ts:117
MEDIUM sql-template-interpolation apps/web/src/lib/chat/push.ts:476
MEDIUM js-dynamic-code-execution apps/web/src/lib/router/verify.ts:91
MEDIUM sh-remote-script-execution scripts/dev-setup.sh:25
MEDIUM sh-eval-expansion scripts/dev-setup.sh:35
MEDIUM sh-remote-script-execution scripts/install.sh:185
MEDIUM sh-remote-script-execution scripts/install.sh:210
MEDIUM sh-remote-script-execution scripts/install.sh:408
MEDIUM sh-remote-script-execution scripts/install.sh:450
LOW py-ssrf-outbound-request examples/business-strategist-agent/chat.py:37
LOW py-ssrf-outbound-request examples/business-strategist-agent/train.py:54
LOW secret-generic-credential node/crates/c0mpute-core/src/webhook.rs:1171
LOW py-path-traversal node/crates/c0mpute-core/tests/fixtures/fake-infernet-text:29

Snippets are redacted; ThreatCrush never prints matched credential material.

@ralyodio
ralyodio merged commit 7720bf4 into master Nov 12, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant