Skip to content

feat(providers): add DeepInfra direct API support - #917

Merged
Astro-Han merged 5 commits into
mainfrom
feat/deepinfra-provider-support
Jul 13, 2026
Merged

Astro-Han merged 5 commits into
mainfrom
feat/deepinfra-provider-support

Conversation

@Astro-Han

Copy link
Copy Markdown
Contributor

Summary

  • Add the stable persisted deepinfra provider across the shared registry, runtime, storage, headless, CLI, and Desktop surfaces.
  • Use DeepInfra's documented Bearer-auth Chat Completions base and official GET /v1/models discovery endpoint, filtered to verified agent/chat fallback IDs.
  • Add deterministic reasoning plus two-stage tool-call coverage and vendor the byte-identical licensed DeepInfra SVG.

Why

Issue #860 Phase 3 needs a direct DeepInfra API slice without conflating it with Hugging Face Inference Providers, OpenRouter, generic deployments, other providers, or Phase 7. The provider needs one stable identity and an evidence-backed discovery/runtime contract rather than behavior inferred from generic OpenAI compatibility.

Refs #860.

Scope

This PR implements only the persisted provider ID deepinfra. It does not add Hugging Face Inference Providers, OpenRouter, custom deployments, or any other provider path.

Verification

  • node ../../worktree-bootstrap.mjs
  • npm run typecheck
  • Core, Storage, Runtime, Headless, CLI, and Desktop tests, including official /v1/models, fallback filtering, exact model ID, reasoning_effort, and two-stage tool-call contracts
  • npm --workspace @maka/desktop run build:renderer
  • npm run check:stale
  • node scripts/check-third-party-notices.mjs
  • Byte comparison against Lobe Icons @lobehub/[email protected] commit e4302041fbb3039608d25f9f618bd462783b875e; SHA-256 2a20be86e90b3c2085d5b3213f52c75e4f0041b239d6140475f5809863d45392
  • git diff --check
  • Named reviewer: 0 P0–P3 findings on final rebased SHA 8cf5be25accca16d75f79a0b1024ea5392629609
  • Local Desktop E2E is deferred to CI per the project workflow. Visual behavior is covered by deterministic provider catalog/detail E2E assertions for the shared mask/currentColor path plus byte-identical SVG governance; no standalone screenshot is attached.
  • Live API smoke was not run because no user DeepInfra credential was available; the deterministic HTTP conformance server verifies the complete request contract without secrets.

Impact

Users can configure DeepInfra directly with a DeepInfra API key, discover the verified current agent models, and use reasoning and tool calling under the stable deepinfra identity. Existing persisted provider identities and the StepFun Step Plan behavior from #916 remain unchanged. No migration is required.

Reviewer notes

The discovery path is intentionally /v1/models, not the currently live but undocumented /v1/openai/models alias. The heterogeneous response is filtered through the registry-owned fallback list because the public model-list contract does not expose a reliable chat-only type discriminator.

Ready for review

  • Verification is complete and the results above are current
  • Impact, compatibility, migration, documentation, and release-note needs are addressed
  • User-visible UI/UX changes include visual evidence, or Verification explains why it is not applicable

@Astro-Han
Astro-Han merged commit d217c64 into main Jul 13, 2026
3 checks passed
@Astro-Han
Astro-Han deleted the feat/deepinfra-provider-support branch July 13, 2026 19:49
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