feat: LiteLLM gateway auto-detection, direct HTTP LLM calls, UX polish#44
Merged
Merged
Conversation
… 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
skills/directory removed (plugin.json now points toglobal/tools)guardKey()inmergeHooks()forge_remember,forge_ledger_ratify,forge_ledger_retractdashSummary()lightweight health-check endpointCommit 2 — Auto-detect LiteLLM gateways, support ANTHROPIC_AUTH_TOKEN, direct HTTP LLM calls:
ANTHROPIC_AUTH_TOKENrecognized as fallback auth credential (was completely absent)ANTHROPIC_MODELenv var overrides tier-based model routinglitellmtypesrc/llm.js: direct HTTP LLM calls via child-process-fetch pattern (same as embed.js)buildRunner()auto-selects: direct HTTP when claude CLI missing orFORGE_LLM_HTTP=1modelOverridefieldChecklist
npm testpasses (500 tests, 0 failures)npm run checkpasses (Biome lint + format)feat:/fix:/docs:…)CHANGELOG.mdupdated under## [Unreleased]forge substrate,forge impact, router/gate, or MCP substrate toolsRisk & rollback
git revert HEAD~2..HEAD— all changes are additive; existing env var paths are unchanged, new paths are fallbacks onlyExtra checks (tick if applicable)
npm run typecheckpassesGenerated by Claude Code