Skip to content

Conversation

@Thachnh
Copy link

@Thachnh Thachnh commented Oct 14, 2025

What’s in this PR

This PR adds DeepInfra as a new inference provider for conversational and text-generation tasks. The integration is via DeepInfra’s OpenAI-compatible API endpoints.

Test

pnpm --filter @huggingface/inference test "test/InferenceClient.spec.ts" -t "DeepInfra"

> @huggingface/[email protected] test /home/thach/huggingface/huggingface.js/packages/inference
> vitest run --config vitest.config.mts test/InferenceClient.spec.ts -t DeepInfra


 RUN  v0.34.6 /home/thach/huggingface/huggingface.js/packages/inference

 ✓ test/InferenceClient.spec.ts (128) 1042ms
   ✓ InferenceClient (128) 1042ms
     ↓ backward compatibility (1) [skipped]
       ↓ works with old HfInference name [skipped]
     ...
     ✓ DeepInfra (3) 1041ms
       ✓ chatCompletion 988ms
       ✓ chatCompletion stream
       ✓ textGeneration 1002ms
     ...

 Test Files  1 passed (1)
      Tests  3 passed | 125 skipped (128)
   Start at  22:16:13
   Duration  3.34s (transform 1.09s, setup 23ms, collect 975ms, tests 1.04s, environment 0ms, prepare 771ms)

What’s next

Follow-up PRs will expand DeepInfra support to additional tasks such as text-to-image and text-to-audio.

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