Custom API provider compatibility
OpenCode requires x-opencode-session to remain stable for a conversation. Yumina derives this header from its conversation identity, hashes it before sending, and sends an honest Yumina User-Agent. Automatic headers apply only to the exact supported OpenCode endpoints. A saved placeholder or static session header cannot override them. Retries reuse the identity, while concurrent conversations remain separate.
A provider's model catalog can be unavailable even when its chat API is accessible. Custom profiles therefore allow manual model IDs without successful discovery. Fetching models does not prove generation works; the chat test must receive a nonempty text reply. Authentication, access denial, rate limiting, catalog failure, and chat failure have separate outcomes. A 404 no longer automatically suggests appending /v1.
Automated regression checks
From the repository root:
pnpm --filter @yumina/server exec tsx --test --test-force-exit src/lib/llm/custom-compat.test.ts src/lib/llm/custom-connection.test.ts src/lib/llm/custom-retry.test.ts src/lib/game-npc/*.test.ts
pnpm --filter @yumina/app exec tsx --tsconfig tsconfig.app.json --test src/features/settings/api-keys.behavior.test.ts
pnpm typecheck
pnpm buildThe provider tests use mocked upstream responses. They cover session stability, isolation, overrides, supported host matching, streaming/nonstreaming requests, parameter fallbacks, single-attempt restrictions, malformed/empty responses, manual model verification, and catalog failures. The UI tests cover manual testing after failed discovery, rejecting empty success responses, saving without discovery, and disabling conflicting controls during requests.
Optional live verification
Use an authorized test account and a model available to that account. Saving a manual model should succeed even if fetching the catalog fails. Send a test message and confirm an actual reply before treating the selected model as working. A successful automated suite does not establish upstream account entitlement, model availability, or acceptance of real traffic; live generation may be billable.
No database migration is required.
Release verification (2026-09-12)
- Workspace build and typecheck passed. The focused provider/game suite passed 82 tests; the subsequently added game conversation identity check also passed with all 11 service tests. All four new UI behavior tests passed.
- Full server suite: 1,550 passed, seven failed, three skipped. Unmodified main at
bcba19378996195da897dc553b659b485e9d67e4reproduced the exact same seven failures (1,529 passed). The accounting and memory billing checks require an isolated PGlite environment; rerunning those two files withDATABASE_URL=''andPGLITE_DATA_DIR=memory://passed all 12 tests. The remaining failures concern a publish timestamp, two existing route-source assertions, and a duplicate world fixture. - Full app suite: 855 passed, seven failed. All seven failures reproduced on unmodified main in existing navigation, drawer, credit indicator, and canvas assertions.
- No live paid provider generation or database migration was performed for this release verification.
