Skip to content

feat: LiteLLM gateway auto-detection, direct HTTP LLM calls, UX polish#44

Merged
CodeWithJuber merged 1 commit into
masterfrom
claude/forge-work-system-setup-p26ka5
Jul 8, 2026
Merged

feat: LiteLLM gateway auto-detection, direct HTTP LLM calls, UX polish#44
CodeWithJuber merged 1 commit into
masterfrom
claude/forge-work-system-setup-p26ka5

Conversation

@CodeWithJuber

Copy link
Copy Markdown
Owner

What & why

Two commits delivering stale-doc fixes, UX simplification, and — critically — full LiteLLM gateway support so forgekit works out-of-the-box in environments using ANTHROPIC_BASE_URL + ANTHROPIC_AUTH_TOKEN (e.g. corporate AI gateways like Emirates aigateway).

Commit 1 — Fix stale docs, simplify CLI, add MCP write tools, improve dashboard UX:

  • ROADMAP.md updated to v0.7.0 with shipped features
  • Landing page metrics corrected (471 tests, 14 tools)
  • Template CLAUDE.md genericized (removed Hostlelo-specific content)
  • Root CLAUDE.md added for forgekit contributors
  • Duplicate skills/ directory removed (plugin.json now points to global/tools)
  • Double-hook dedup via guardKey() in mergeHooks()
  • CLI help grouped into Core/Memory/Substrate/Quality/Config categories
  • 3 MCP write tools added: forge_remember, forge_ledger_ratify, forge_ledger_retract
  • dashSummary() lightweight health-check endpoint
  • Dashboard empty-state guidance messages

Commit 2 — Auto-detect LiteLLM gateways, support ANTHROPIC_AUTH_TOKEN, direct HTTP LLM calls:

  • ANTHROPIC_AUTH_TOKEN recognized as fallback auth credential (was completely absent)
  • ANTHROPIC_MODEL env var overrides tier-based model routing
  • Gateway URL heuristic: URLs containing "gateway"/"litellm" classified as litellm type
  • New src/llm.js: direct HTTP LLM calls via child-process-fetch pattern (same as embed.js)
  • buildRunner() auto-selects: direct HTTP when claude CLI missing or FORGE_LLM_HTTP=1
  • Doctor checks for claude CLI presence and surfaces model overrides
  • Route output includes modelOverride field

Checklist

  • npm test passes (500 tests, 0 failures)
  • npm run check passes (Biome lint + format)
  • New public functions have a test
  • Conventional commit message (feat:/fix:/docs: …)
  • CHANGELOG.md updated under ## [Unreleased]
  • No new runtime dependency (dev deps ok)
  • Substrate/docs updated if this changes forge substrate, forge impact, router/gate, or MCP substrate tools

Risk & rollback

  • Risk level: low
  • Rollback plan: git revert HEAD~2..HEAD — all changes are additive; existing env var paths are unchanged, new paths are fallbacks only

Extra checks (tick if applicable)

  • npm run typecheck passes
  • Input validated at boundaries; errors handled (no swallowing)
  • Logs contain no secrets/PII (auth keys travel via child env, never argv)
  • If AI-assisted: I understand it, verified the package APIs, and it has tests

Generated by Claude Code

… direct HTTP LLM calls

Provider detection now recognizes ANTHROPIC_AUTH_TOKEN as a fallback
auth credential and detects LiteLLM gateways from ANTHROPIC_BASE_URL
patterns (URLs containing "gateway", "litellm", etc.). ANTHROPIC_MODEL
env var overrides tier-based model routing when set.

New src/llm.js provides direct HTTP LLM calls via child-process-fetch
(same pattern as embed.js) so the LLM proposer works without the claude
CLI. buildRunner() in adjudicate.js auto-selects: direct HTTP when
claude CLI is missing or FORGE_LLM_HTTP=1, otherwise claude -p.

Doctor now checks for claude CLI presence and surfaces model overrides.
Route output includes modelOverride field when ANTHROPIC_MODEL is set.

26 new tests (500 total, 0 failures).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019PXuKmJp92Gdo2FudNjSx2
@CodeWithJuber CodeWithJuber marked this pull request as ready for review July 8, 2026 19:57
@CodeWithJuber CodeWithJuber merged commit 9564992 into master Jul 8, 2026
10 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.

2 participants