Skip to content

Conversation

@Kludex
Copy link
Member

@Kludex Kludex commented Nov 19, 2025

We need the genai-prices part to merge this. cc @alexmojaki

Copy link

@hanouticelina hanouticelina left a comment

Choose a reason for hiding this comment

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

thank you for working on this! Excited to get HF Inference Providers into Pydantic AI Gateway 🔥

},
huggingface: {
providerId: 'huggingface',
baseUrl: 'https://api-inference.huggingface.co',

Choose a reason for hiding this comment

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

https://api-inference.huggingface.co is deprecated, the base URL for Hugging Face Inference Providers should be https://router.huggingface.co/v1. more details in the docs here.

Suggested change
baseUrl: 'https://api-inference.huggingface.co',
baseUrl: 'https://router.huggingface.co/v1',

import { DefaultProviderProxy } from './default'

export class HuggingFaceProvider extends DefaultProviderProxy {
defaultBaseUrl = 'https://api-inference.huggingface.co'

Choose a reason for hiding this comment

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

same comment as above

Suggested change
defaultBaseUrl = 'https://api-inference.huggingface.co'
defaultBaseUrl = 'https://router.huggingface.co/v1'

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.

3 participants