Skip to main content
The Gemini model provides access to Google’s Gemini models.

Parameters

ParameterTypeDefaultDescription
idstr"gemini-1.5-flash"The id of the Gemini model to use
namestr"Gemini"The name of the model
providerstr"Google"The provider of the model
api_keyOptional[str]NoneThe API key for Google AI (defaults to GOOGLE_API_KEY env var)
generation_configOptional[Dict[str, Any]]NoneGeneration configuration parameters for the model
safety_settingsOptional[List[Dict]]NoneSafety settings to filter content
toolsOptional[List[Dict]]NoneTools available to the model
tool_configOptional[Dict[str, Any]]NoneConfiguration for tool use
system_instructionOptional[str]NoneSystem instruction for the model
cached_contentOptional[str]NoneCached content identifier for context caching
request_paramsOptional[Dict[str, Any]]NoneAdditional parameters to include in the request
client_paramsOptional[Dict[str, Any]]NoneAdditional parameters for client configuration
thinking_enabledOptional[bool]NoneWhether to enable thinking mode for supported models
I