Skip to content

[aw] Primer API Review exceeded max AI credits #8433

Description

@github-actions

Workflow Failure

Workflow: Primer API Review
Branch: main
Run: https://github.com/primer/react/actions/runs/35580962225

Warning

Invalid or Unsupported Model: The agent failed because the configured model name is invalid, unknown, or unavailable for this engine/account.

This is a configuration issue, not a transient error — retrying will not help.

How to fix this

Specify a valid model for the selected engine in the workflow frontmatter:

---
engine: copilot
model: gpt-5-mini
---

To find valid models, check your engine/provider documentation (for Copilot see supported models).

If the error text is No model available. Check policy enablement under GitHub Settings > Copilot, the model is not disabled in the workflow but by Copilot policy. Enable the model under GitHub Settings > Copilot > Policies for the org/repo, or pick a model that is already enabled. This can also be triggered by a subagent (task tool) dispatch requesting a model that the policy does not allow, even when the main agent's model is enabled.

Warning

AI Credits Budget Exceeded

The workflow hit the configured max-ai-credits guardrail. Used 1K of 1K max (over by 10.1).

Increase the limit

Update max-ai-credits in your workflow frontmatter:

max-ai-credits: 2000
Tips for reducing AI credit usage
  • Review the cost optimization guidance.
  • Reduce unnecessary model or tool calls in the prompt.
  • Trim large inputs or excess context that does not change the outcome.
  • Split large tasks across smaller runs when possible.

Warning

Engine Failure: The copilot engine terminated unexpectedly.

Last agent output:

  Check your COPILOT_PROVIDER_API_KEY, COPILOT_PROVIDER_API_KEY_COMMAND, or COPILOT_PROVIDER_BEARER_TOKEN.
Changes    +0 -0
Duration   16m 15s
Tokens     ↑ 19.9m (19.0m cached) • ↓ 439.8k
Resume     copilot --resume=4dd36fd7-e660-4c01-8497-62c7ceac24dc
Authentication failed with provider at http://172.30.0.30:10002 (HTTP 403).
  Check your COPILOT_PROVIDER_API_KEY, COPILOT_PROVIDER_API_KEY_COMMAND, or COPILOT_PROVIDER_BEARER_TOKEN.
Changes    +0 -0
Duration   0s
Resume     copilot --resume=11daa582-ad09-4edc-b045-643b64a37890

Action Required

Assign this issue to an agent to debug and fix the issue.

Optimize token consumption

This failure was triggered by a guardrail limit (max-ai-credits). Use this prompt with any coding agent (GitHub Copilot, Claude, Gemini, etc.) to analyze token usage and reduce costs:

Optimize the agentic workflow token consumption using https://raw.githubusercontent.com/github/gh-aw/main/optimize.md

The workflow run is at https://github.com/primer/react/actions/runs/35580962225
Debug with any coding agent

Use this prompt with any coding agent (GitHub Copilot, Claude, Gemini, etc.):

Debug the agentic workflow failure using https://raw.githubusercontent.com/github/gh-aw/main/debug.md

The failed workflow run is at https://github.com/primer/react/actions/runs/35580962225
Manually invoke the agent

Debug this workflow failure using your favorite Agent CLI and the agentic-workflows prompt.

Tip

Stop reporting this workflow as a failure

To stop a workflow from creating failure issues, set report-failure-as-issue: false in its frontmatter:

safe-outputs:
  report-failure-as-issue: false

Generated from Primer API Review · copilot · 1K AIC ·

  • expires on Sep 28, 2026, 9:20 AM UTC

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions