Debug and diagnose model errors in Pollinations services. Analyze logs, find error patterns, identify affected users. For taking action on user tiers, see tier-management skill.
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.
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.wrangler tail for live events. Verify the target environment before querying it.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.generation_event_v2 contains authenticated, non-cached requests. Check its current datasource definition before writing SQL. It can contain several upstream-attempt rows per request; is_final identifies the user-visible result. A successful fallback can hide a broken primary if you only count final responses.model_health, total_requests and status counts use final results; own_calls, primary_5xx, primary_retried_503s, and fallback_rescues describe upstream health and recovery. Check both views.error_source and error_response_code in generation_event_v2; check upstream_status, upstream_body, and upstream_host in error_event through recent_server_errors.pipe (24-hour retention) before treating it as caller noise or a model outage.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.