Skip to content

[aw] Refactor Opportunist hit AI credits rate limit #1451

Description

@github-actions

Workflow Failure

Workflow: Refactor Opportunist
Branch: main
Run: https://github.com/elastic/ai-github-actions/actions/runs/28382426387

Warning

AI Credits Budget Exceeded

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

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

Unknown Model for AI Credits Pricing: The agent failed because the requested model is not in the built-in AI credits pricing table and max-ai-credits is active. The AWF API proxy rejected the request with an HTTP 400 error.

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

How to fix this

Choose one of the following options:

Option 1 — Map the model to a known model using the models field:

Use the models frontmatter field to provide an alias from your custom model name to a model that exists in the built-in pricing table:

---
model: my-custom-model
max-ai-credits: 500
models:
  my-custom-model:
    model: gpt-4.1
---

Option 2 — Use a model already in the built-in pricing table:

Switch to a model name that the AWF pricing system recognizes directly (e.g. gpt-4.1, claude-sonnet-4-5, gemini-2.0-flash).

Option 3 — Set a default AI credits price as a fallback:

Add defaultAiCreditsPricing to supply a price for any unrecognized models:

---
model: my-custom-model
max-ai-credits: 500
models:
  my-custom-model:
    defaultAiCreditsPricing: 3.0
---

Warning

Engine Failure: The copilot engine terminated unexpectedly.

Last agent output:

Approach: add compiler/precompile support for fragment-declared workflow inputs, then move only `messages-footer` there.
POC: migrate one workflow, e.g. `gh-aw-pr-labeler.md`.
Validate: `make compile && make lint-workflows`.● Read (General-purpose agent — Investigate duplication refactor)
  └ Completed
Authentication failed with provider at http://172.30.0.30:10002 (HTTP 403).
  Check your COPILOT_PROVIDER_API_KEY or COPILOT_PROVIDER_BEARER_TOKEN.
Changes    +0 -0
Duration   2m 52s
Tokens     ↑ 1.7m (1.4m cached) • ↓ 20.6k (7.7k reasoning)
 — not retrying (first-attempt auth failure is non-retryable)

Action Required

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

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/elastic/ai-github-actions/actions/runs/28382426387
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 Refactor Opportunist · 1K AIC ·

  • expires on Jul 6, 2026, 3:20 PM UTC

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions