Logo

google

#10567

configuration_error

Json mode is not enabled for the specified model configuration.

This error has been identified and solved.

Reason

The 400 status error you are encountering, specifically the message "Json mode is not enabled for models/gemini-2.0-flash-thinking-exp-1219," indicates that the particular model you are using (gemini-2.0-flash-thinking-exp-1219) does not support JSON mode. This error is a client-side issue where the request is invalid because the specified model configuration does not include the capability for JSON mode.

Solution

To fix the 400 status error due to "Json mode is not enabled for models/gemini-2.0-flash-thinking-exp-1219," you need to adjust your model configuration. Here are the key steps:

  • Use a model that supports JSON mode, such as gemini-1.5-flash or gemini-1.5-pro.

  • Ensure that the model you choose is compatible with the features you are trying to use.

  • Check the documentation for the specific model to confirm its capabilities.

Here are some concise steps:

  • Switch to a supported model.

  • Verify model compatibility.

  • Refer to model documentation for specific features.

Original Error Message

Raw

Json mode is not enabled for the specified model configuration.

Original Error Message

Raw

Json mode is not enabled for the specified model configuration.

© 2024 Portkey, Inc. All rights reserved

HIPAA

COMPLIANT

GDPR

Transform Your AI app prototypes to be production-ready

Talk to us →