feat(llm): add native Novita AI provider via OpenAI-compatible endpoint - #155
Conversation
Wire Novita AI (https://api.novita.ai/openai/v1) as a first-class LLM provider, following the same pattern used for DeepSeek/HuggingFace/NanoGPT: dispatched through the existing OpenAIAdapter, resolved via NOVITA_API_KEY, with a default model, model catalog entries, config/setup wiring, and regression tests.
…model Swap the curated Novita model catalog's second entry from qwen/qwen3-coder-30b-a3b-instruct to deepseek/deepseek-v4-flash-0731 per requested model selection. Verified live against api.novita.ai/openai/v1/models.
…gship QA flagged that deepseek/deepseek-v4-flash-0731 has been superseded in the live Novita catalog; deepseek/deepseek-v4-pro-0813 is now the current serving DeepSeek flagship. Swap the second Novita model catalog entry accordingly.
jmagly
left a comment
There was a problem hiding this comment.
Reviewed exact head 6a1af1b31967b6d6f09ce9a8f90fc2b6a28f4c84 against main at 6d4e017, including the hosted-provider trust boundary.
The service and wire shape are real: Novita's current official documentation corroborates the OpenAI-compatible base, Bearer authentication, /openai/v1/models, and /openai/v1/chat/completions; its current public catalog lists GLM 5.2 and DeepSeek V4 Pro 0813 with the dimensions used here. The focused config/model-list/redaction tests pass.
Two blockers remain:
-
The named-provider integration is incomplete across user-facing contracts.
README.md,docs/GETTING_STARTED.md, and the provider controls/model lists indocs/index.htmlstill omit Novita, so a key can be configured through the terminal wizard but the documented and browser setup/status surfaces disagree. Add the provider to those surfaces and disclose that prompts, outputs, request metadata, and the API credential leave T3MP3ST for a third-party hosted service. Link the current provider privacy/terms material without making an unsupported sensitive-workload assurance claim. -
The tests prove registry/config wiring and model discovery only. Add provider-specific mocked HTTP regressions through the actual backbone for the correct chat URL and authorization, success, 401/429, timeout/malformed response, and no unintended fallback. The PR currently reports “residual risk: none,” but remote-provider retention, subprocessors, availability, and model-catalog drift remain external unknowns; record those honestly.
Verification:
npm ci: passnpm run typecheck: pass- focused Novita/provider-model/redaction tests: 28/28 pass
- full local suite: 757/758; only the known environment-dependent Codex PATH assertion failed, as already disclosed in the PR
- hosted checks: none reported for this head
Provider verdict: service real; wire/catalog partially independently verified; sensitive-workload trust unproven; integration incomplete; not merge-ready.
Merge current main and complete the reviewed provider boundary with user-facing disclosure, browser configuration, provider-specific credential errors, HTTP status propagation, and focused wire/fallback coverage.\n\nMaintainer courtesy follow-up for PR elder-plinius#155.
|
I completed the remaining bounded review work as a maintainer courtesy and pushed signed commit What I changed:
Verification on the prospective merged tree:
Thank you for the substantive provider implementation. I’ll recheck hosted CI and the exact new head before merging. |
jmagly
left a comment
There was a problem hiding this comment.
Re-reviewed exact head c80ec425b2d35846309094a4798cb03f5d746ff7 against current main at 41f0c140397ac41e09d03cb255d77540e61a9c00.
The previously requested integration-completeness and provider-boundary changes are resolved. Official Novita documentation corroborates the OpenAI-compatible endpoint, Bearer authentication, model-list route, and current catalog entries. The user-facing setup surfaces now agree, hosted data flow and residual trust limits are disclosed, missing credentials identify NOVITA_API_KEY, HTTP status is preserved for retry/fallback policy, and focused tests cover the actual chat wire plus 401/429 and opt-in-only fallback.
Verification:
- signed maintainer courtesy commit verified
npm run typecheck: pass- focused provider/model/redaction/UI tests: 36/36 pass
npm test: 767/767 plus ops/model/refusal gates pass- hosted exact-head CI: pass
Provider verdict: service real; endpoint/catalog independently corroborated; sensitive-workload trust remains explicitly unproven and disclosed; integration complete for the claimed scope; merge-ready.
Decision: approve this exact head. Review expires on head/base/check drift.
Contribution Receipt
OpenAIAdapter, resolved viaNOVITA_API_KEY, with a default model, curated model catalog entries, config/setup wiring, and regression tests.api.novita.ai/openai/v1to verify catalog and chat responses during development; no network calls in the shipped test suite)npm run typecheck-> passnpx vitest run src-> 757/758 pass (the sole failure is a pre-existing environment-dependentlocal-agent-path-resolution.test.tsassertion tied tocodexbeing on the local PATH; unrelated to this change)npm run doctor-> pass, 0 blockersNOVITA_API_KEYfollows the existing.env.examplepattern used by other providersVerification
git diff --name-status upstream/main...HEADreviewed: only Novita provider wiring and its tests are touched (.env.example,src/config/index.ts,src/config/provider-models.ts,src/llm/index.ts,src/setup.ts,src/types/index.ts, and new/updated tests). No unrelated deletions.createNovitaBackbone()→LLMBackbone.chat()→OpenAIAdapteragainst the authenticated Novita catalog confirmed a working chat completion (deepseek/deepseek-v4-pro-0813,finishReason: "stop", usage populated).