OpenAI API compatibility and logprobs

When I try to use OpenAI API with Gemini, for example with:

    result = await client.chat.completions.create(
            messages=[
                {
                    "role": "user",
                    "content": "Jello world!",
                }
            ],
            model="gemini-2.0-flash",
            logprobs=True
        )

I’m getting Error code: 400 - [{'error': {'code': 400, 'message': 'Invalid JSON payload received. Unknown name "logprobs": Cannot find field.', 'status': 'INVALID_ARGUMENT', 'details': [{'@type': 'type.googleapis.com/google.rpc.BadRequest', 'fieldViolations': [{'description': 'Invalid JSON payload received. Unknown name "logprobs": Cannot find field.'}]}]}}]

I suppose this means that this part of the API isn’t implemented. I’ve found some references to this situation. But I’m wondering to what extent is that the case. Is there a table of the features that are implemented, or some other reference I could rely on?

Hi @Jiri_Podivin , welcome to the forum.

logprobs is not yet supported with Gemini under OpenAI compatibility. While there is no table of supported features, you can check the available features in the OpenAI compatibility documentation provided by Google to verify what is currently implemented.

Do I understand correctly that anything that isn’t described in the docs is not available?

Yes, you are right! If it is not in the docs, it probably is not available yet. But new features do get added, so it is good to check for updates now and then.

just wanted to add that logprobs in the openai sdk would be extremely useful for me too