Skip to main content

Hugging Face Dedicated Endpoint

Bad API Key.

Error Message Looks Like This

Exception: Error code: 401 - {'error': '401 Unauthorized'}

Reason

Old, expired, or otherwise invalid API Key. Copy-pasted the API Key from the wrong Provider?

Solution

Fix the API Key.

Bad Model Name

Error Message Looks Like This

(this is not used for Hugging Face Dedicated Endpoints)

Reason

Something went wrong.

Solution

Delete and recreate the model.

Bad Parameter

Error Message Looks Like This

Exception: Failed to deserialize the JSON body into the target type: max_tokens: invalid value: integer 999999999999, expected u32 at line 1 column 238

Reason

The model name must be exactly as published by the Inference Provider.

Solution

Examine the parameter list. Not all providers use the same parameters, and not all models have the same parameters available.

Bad ProviderUrl

Error Message Looks Like This

Exception: Error code: 404

Reason

The model name must be exactly as published by the Inference Provider. You will need the maker and the model name. They are separated by a slash.

Solution

Review all settings. Delete and recreate the model.

Corrupted API Template.

Error Message Looks Like This

Inference Failure. provider: 'Hugging Face EndpointXXX' not found. Most likely due to corrupted API template.

Reason

This should not happen if the model was configured through the UI. Were you messing with the configuration JSON file directly?

Solution

Delete and recreate the model. Or revert to the backup of the JSON configuration that you made before messing with it.