Skip to main content

Google

Bad API Key.

Error Message Looks Like This

Exception: 400 API key not valid. Please pass a valid API key. [reason: "APIKEYINVALID"
domain: "googleapis.com" metadata { key: "service" value: "generativelanguage.googleapis.com" } ]

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

Exception: 400 * GenerateContentRequest.model: unexpected model name format

Reason

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

Solution

Fix the model name.

Bad Parameter

Error Message Looks Like This

Exception: Value out of range: 999999999999

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

(there is no error message)

Reason

This should never happen because the Google url is hardcoded in their integration package.

Solution

Review all settings. Delete and recreate the model.

Corrupted API Template.

Error Message Looks Like This

Inference Failure. provider: 'GoogleAIXXX' 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.