Skip to content

AgentFuse v0.2.0 — multi-provider + tiktoken fallback

Choose a tag to compare

@SuperMarioYL SuperMarioYL released this 18 May 04:11
· 4 commits to main since this release

v0.2.0 deepens the wedge: same single-binary kill-switch, now covering five provider families.

New providers

  • Gemini (:generateContent / :streamGenerateContent) — native wire format handler.
  • DeepSeek — OpenAI-compatible shape, but the handler tolerates DeepSeek's usage field placement in both streaming and non-streaming responses.
  • OpenAI-compatible passthrough — catch-all for Groq / Mistral / xAI / Together / OpenRouter / any host with an OpenAI-shape API. Routed via provider = "openai_compat" + upstream_url in .fuse.toml.

Stream-usage gap closed

internal/tokens/tiktoken.go wraps github.com/pkoukk/tiktoken-go. When an upstream's streamed response omits usage (common for OpenAI-compat endpoints), the proxy re-tokenizes prompt + completion locally and uses the price table to estimate cost. Completion length rounds up to the nearest 100 tokens — under-billing is unacceptable.

Price table

  • Bundled snapshot at assets/prices.toml (and embedded copy at internal/prices/prices_bundled.toml because //go:embed can't reach outside the package).
  • User overrides land at ~/.fuse/prices.toml — deep merge, user keys win.
  • Zero network. No remote price fetcher of any kind.

Trust premise unchanged

This binary never talks to anything other than the provider you point it at.

No telemetry, no auto-update check, no remote price endpoint. The same promise as v0.1.

Tests

43 PASS / 0 FAIL across 7 packages, including 4 gemini / 3 deepseek / 4 openai_compat / 6 tiktoken / 6 prices tests. v0.1 tests unchanged.

Migration from v0.1.0

Drop-in. Existing .fuse.toml files work unchanged; new fields (provider, upstream_url) are opt-in. See examples/.fuse.toml.{gemini,deepseek,openai-compat} for the new shapes.

What's next

If price-table drift becomes painful, v0.3.0 will revisit either UX or the bundled-snapshot model. Kill criteria documented in mvp_plan_v0.2.0.md §8.

🤖 Auto-shipped from ai-radar pipeline scan-2026-05-17-2013, amendment v0.2.0.