Skip to content

feat(llm): add native Novita AI provider via OpenAI-compatible endpoint - #155

Merged
jmagly merged 4 commits into
elder-plinius:mainfrom
jax-novita:add-novita-provider
Aug 23, 2026
Merged

feat(llm): add native Novita AI provider via OpenAI-compatible endpoint#155
jmagly merged 4 commits into
elder-plinius:mainfrom
jax-novita:add-novita-provider

Conversation

@jax-novita

Copy link
Copy Markdown
Contributor

Contribution Receipt

  • Change: Add 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, curated model catalog entries, config/setup wiring, and regression tests.
  • Scope class: local_lab
  • Target authority: n/a — LLM provider integration, no target scope involved
  • Network use: authorized_external (live call to api.novita.ai/openai/v1 to verify catalog and chat responses during development; no network calls in the shipped test suite)
  • Run mode labels: n/a
  • Model/harness labels: n/a
  • Commands run:
    • npm run typecheck -> pass
    • npx vitest run src -> 757/758 pass (the sole failure is a pre-existing environment-dependent local-agent-path-resolution.test.ts assertion tied to codex being on the local PATH; unrelated to this change)
    • npm run doctor -> pass, 0 blockers
  • Artifacts: none
  • Redaction: none required — no secrets or credentials touch the diff; NOVITA_API_KEY follows the existing .env.example pattern used by other providers
  • Claims changed: none
  • Abstentions/refusals: none
  • Residual risk: none — change is additive and follows the existing provider-registration pattern; no existing provider behavior is modified

Verification

  • git diff --name-status upstream/main...HEAD reviewed: 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.
  • Live smoke test through createNovitaBackbone()LLMBackbone.chat()OpenAIAdapter against the authenticated Novita catalog confirmed a working chat completion (deepseek/deepseek-v4-pro-0813, finishReason: "stop", usage populated).

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 jmagly left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:

  1. The named-provider integration is incomplete across user-facing contracts. README.md, docs/GETTING_STARTED.md, and the provider controls/model lists in docs/index.html still 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.

  2. 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: pass
  • npm 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.
@jmagly

jmagly commented Aug 23, 2026

Copy link
Copy Markdown
Collaborator

I completed the remaining bounded review work as a maintainer courtesy and pushed signed commit c80ec42 to this branch after merging current main.

What I changed:

  • added Novita to the browser Universal API Config and its canonical base URL;
  • documented the hosted data flow and linked Novita's current privacy policy/terms without asserting sensitive-workload assurance;
  • added a provider-specific adapter so missing credentials name NOVITA_API_KEY rather than an OpenAI key;
  • propagated OpenAI-compatible HTTP status as LLMApiError, including bounded Retry-After handling;
  • added real-backbone mocked wire tests for URL, Bearer auth, request model/body, 401/429 behavior, and opt-in-only cross-provider fallback;
  • synced the published docs source.

Verification on the prospective merged tree:

  • npm run typecheck: pass
  • focused provider/model/redaction/UI tests: 36/36 pass
  • npm test: 767/767 plus ops/model/refusal gates pass

Thank you for the substantive provider implementation. I’ll recheck hosted CI and the exact new head before merging.

@jmagly jmagly left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@jmagly
jmagly merged commit e05bdc4 into elder-plinius:main Aug 23, 2026
2 checks passed
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.

2 participants