Skip to content

candidate_count parameter not working for gemini-3-pro-preview #1723

@jasfu

Description

@jasfu

I’m getting this error when trying to request multiple candidates::

ClientError: 400 INVALID_ARGUMENT. {'error': {'code': 400, 'message': 'Multiple candidates is not enabled for this model', 'status': 'INVALID_ARGUMENT'}}

Environment details:

  • Programming language: Python
  • Package version: 1.51.0

Code snippet:
client.models.generate_content(
model='gemini-3-pro-preview',
contents='What is the capital of the moon?',
config={
"candidate_count": 2
},
)

Is this working as intended? And is support for multiple candidates planned for this model?

Metadata

Metadata

Assignees

Labels

priority: p2Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions