Model debugging

From pollinations/pollinations · View interactive version

Model debugging is an AI agent skill from the GitHub repository pollinations/pollinations. Diagnose Pollinations model failures, error spikes, timeouts, and incorrect output using current gen/enter logs and Tinybird data. Use for incidents or specific failed requests; use model-management for catalog, routing, or pricing changes.

How to use this skill

Skill file

Model debugging

Read the repository AGENTS.md and inspect the current route before diagnosing a live issue. Treat a reported cause as a hypothesis. Establish the affected model, request shape, environment, time window, and user-visible symptom first.

Trace the failure

  1. Check the Model Monitor and the current definitions of enter.pollinations.ai/observability/endpoints/model_health.pipe and recent_server_errors.pipe. The monitor shows aggregated health; the error pipe contains recent actionable server-side failures.
  2. Trace a request ID through the enter and gen Workers, then the provider. Use the relevant Worker's logs or wrangler tail for live events. Verify the target environment before querying it.
  3. For production SQL, use enter.pollinations.ai/observability/scripts/tb-prod.sh. It loads the existing read token without printing it. Use --check to verify access and fresh events. Keep queries bounded by time and row count.
  4. Compare the affected user's requests with other users of the same model and route. Group by status, upstream status, provider, request shape, and time. Reproduce the exact request with an existing authorized test credential when needed; use a unique prompt to avoid mistaking a cached response for a healthy upstream.
  5. Report the evidence, impact, remaining uncertainty, and smallest fix. If a code fix is requested, follow the relevant repository skill and testing instructions.

Interpret the data

Targeted helpers

The scripts in scripts/ query production Tinybird through the repository's read-only helper. They accept bounded numeric windows and should be run from the repository root:

.claude/skills/model-debugging/scripts/find-402-users.sh 24 10
.claude/skills/model-debugging/scripts/find-403-users.sh 24 10
.claude/skills/model-debugging/scripts/find-500-errors.sh 24
.claude/skills/model-debugging/scripts/check-user-errors.sh USER_ID 24

These reports contain user identifiers and error details. Inspect only the rows needed for the task and keep sensitive values out of shared output.

Secret changes and production deployments follow the approval and CI rules in AGENTS.md; an incident diagnosis does not authorize either operation.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.