Files
Garry TanandClaude Fable 5 73256e56a0 fix(config): route remaining hand-rolled configureGateway callsites through buildGatewayConfig
Takeover of #2430 (rebased onto master; the providers.ts hunk already
landed there). Five command callsites still rebuilt partial gateway
configs by hand, dropping file-plane API keys (config.json
openai/anthropic/zeroentropy/openrouter keys), env-provided provider
base URLs, and provider_chat_options:

- src/commands/eval-takes-quality.ts: spread `{...cfg, ...process.env}`
  at top level, so the gateway's `env` field was never populated at all —
  availability/diagnose checks dereferenced undefined and threw.
- src/commands/eval-cross-modal.ts: configureGatewayForCli hand-rolled
  both branches; now one buildGatewayConfig call.
- src/commands/init.ts: all three configureGateway sites (merged-
  precedence helper + PGLite + Postgres init) now overlay the resolved
  model fields on loadConfig() and route through the adapter.
- src/commands/migrations/in-process.ts: runMigrateOnlyCore same.

Tests: new test/eval-takes-quality-gateway.test.ts (fails with a throw
on the old code path); LLAMA_SERVER_RERANKER_BASE_URL added to the
adapter passthrough sweep; cli-multimodal-integration now imports the
real adapter instead of a hand-maintained mirror copy. KEY_FILES.md
entries updated to current state.

Co-authored-by: TheAngryPit <TheAngryPit@users.noreply.github.com>

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-21 14:34:19 -07:00
..