Skip to content

A test for the hop that has failed three times - #3

Merged
MasterYoav merged 2 commits into
masterfrom
testable-model-hop
Sep 18, 2026
Merged

MasterYoav merged 2 commits into
masterfrom
testable-model-hop

Conversation

@MasterYoav

Copy link
Copy Markdown
Owner

buildModel chose the chat client inside index.ts, which cannot be imported without booting the server — so the one hop docs/12 records failing three times (parsed but dropped, wrong key, never read back) had no test. A wrong client still answers, so nothing outside notices.

  • models/build.ts (new file, per CLAUDE.md) holds the body; index.ts keeps the env-derived defaults and calls it.
  • 8 tests: client per provider, the compatible endpoint's base URL, fallback inheritance, missing key, and reasoning effort reaching OpenAI but never Anthropic.
  • Mutation-checked: breaking the Google branch fails the Google test.
  • biome.json stops checking **/.impeccable, a local tool's cache that made the documented format gate fail on a file CI never sees.

Verified: format:check, lint, typecheck, and test:ci (2243 pass, 0 fail) against a real pgvector database.

🤖 Generated with Claude Code

MasterYoav and others added 2 commits September 18, 2026 09:56
…ers.

Lifted buildModel into models/build.ts so it can be tested without booting
the server. docs/12 records three silent failures on this path; the tests
assert the client and the address it was handed, which is what tells them
apart without a live vendor.

Biome was also checking a local plugin's cache file, so the documented
local gate failed on a file CI never sees.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@MasterYoav
MasterYoav merged commit 2a04e09 into master Sep 18, 2026
3 checks passed
@MasterYoav
MasterYoav deleted the testable-model-hop branch September 18, 2026 06:58
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