simonw/llm-gemini

No response and exit code is zero for PROHIBITED_CONTENT

Open

#80 aberto em 18 de mai. de 2025

Ver no GitHub
 (5 comments) (0 reactions) (0 assignees)Python (52 forks)github user discovery
help wanted

Métricas do repositório

Stars
 (445 stars)
Métricas de merge de PR
 (Métricas PR pendentes)

Description

The command like llm -m gemini-2.0-flash "prompt" -f "file.txt" returned no response nor any indication of a failure. llm version is 0.25

In responses table response field is empty. response_json is below:

{
    "promptFeedback": {
        "blockReason": "PROHIBITED_CONTENT"
    },
    "usageMetadata": {
        "promptTokenCount": 9311,
        "totalTokenCount": 9311,
        "promptTokensDetails": [
            {
                "modality": "TEXT",
                "tokenCount": 9311
            }
        ]
    },
    "modelVersion": "gemini-2.0-flash"
}

Additionally, these fields are null:

  • input_tokens
  • output_tokens
  • token_details

The quickest fix could be just output the json to stdout, so a user have a clue of what's going on.

Guia do colaborador