Skip to content

ci: unbreak Bonk (OpenCode version + model id) - #145

Closed
andre-j3sus wants to merge 3 commits into
mainfrom
ajesus/fix-bonk-opencode-version
Closed

ci: unbreak Bonk (OpenCode version + model id)#145
andre-j3sus wants to merge 3 commits into
mainfrom
ajesus/fix-bonk-opencode-version

Conversation

@andre-j3sus

Copy link
Copy Markdown
Collaborator

Bonk has failed on every run since 2026-08-18; the last success was 2026-07-31.
The failure was silent from the outside — an empty comment, then "check the
logs for details", with no error in the logs either — which is why it went
unnoticed for three weeks.

Two faults, the first hiding the second.

The pinned OpenCode 1.15.13 swallowed the underlying error, emitting only
loop { step: 0 } and zero tokens. bonk.yml had not been modified since it
was added, and cloudflare/workers-sdk fails identically while pinning a March
action SHA, so neither this repo's config nor the action code was the cause —
what both broken repos share is that pin. ask-bonk#226 tracked the same
provider-initialization failures on 2026-08-18 and verified 1.18.18.

Bumping the pin immediately surfaced the real fault:

Model not found: cloudflare-ai-gateway/anthropic/claude-opus-4-8.
Did you mean: anthropic/claude-opus-4.5, anthropic/claude-opus-4.6,
anthropic/claude-opus-4.7?

The version component is dot-separated and 4.8 does not exist. The id resolved
until July 31, so this looks like a gateway-side catalog change. Moving to 4.7,
the newest offered.

Credentials are not implicated: cloudflare-docs uses the same three
CF_AI_GATEWAY_* secrets and its Bonk workflow is green.

The version stays pinned rather than moving to latest, since floating is what
produced this drift — though it is worth noting 1.15.13 reported nothing at all
while 1.18.18 named the problem on its first run.

Reopened from #144 so the pull_request: [opened] trigger fires; comment-driven
runs execute the workflow from the default branch, so they cannot exercise this
change until it merges.

Bonk has failed on every run since 2026-08-18; the last success was
2026-07-31. Each run creates a session, sends the message, logs a single
"loop { step: 0 }", then emits zero tokens and exits 1 -- the provider never
initializes.

bonk.yml has not changed since it was added, and cloudflare/workers-sdk
fails identically while pinning a March action SHA, so neither this repo's
config nor the action code is the cause. What both broken repos share is the
1.15.13 pin. ask-bonk#226 tracked the same provider-initialization failures
on 2026-08-18 and verified a working run on 1.18.18.

Keeping the version pinned rather than moving to latest, since floating is
what produced this drift in the first place.
Bumping OpenCode surfaced the error 1.15.13 was swallowing:

  Model not found: cloudflare-ai-gateway/anthropic/claude-opus-4-8.
  Did you mean: anthropic/claude-opus-4.5, anthropic/claude-opus-4.6,
  anthropic/claude-opus-4.7?

The version component is dot-separated, and 4.8 does not exist. Moving to
4.7, the newest the gateway offers.
@andre-j3sus andre-j3sus self-assigned this Aug 24, 2026
@ask-bonk

ask-bonk Bot commented Aug 24, 2026

Copy link
Copy Markdown

APIError: Invalid Anthropic API Key

github run

2 similar comments
@ask-bonk

ask-bonk Bot commented Aug 24, 2026

Copy link
Copy Markdown

APIError: Invalid Anthropic API Key

github run

@ask-bonk

ask-bonk Bot commented Aug 24, 2026

Copy link
Copy Markdown

APIError: Invalid Anthropic API Key

github run

@ask-bonk

ask-bonk Bot commented Aug 24, 2026

Copy link
Copy Markdown

@andre-j3sus Bonk workflow failed. Check the logs for details.

View workflow run · To retry, trigger Bonk again.

Fixing the model id got past "Model not found" and reached the provider,
which then returned:

  AI_APICallError: Invalid Anthropic API Key
  {"code":"authentication_error","message":"Invalid Anthropic API Key"}

The three CF_AI_GATEWAY_* secrets are fine -- they authenticate to the
gateway. What is invalid is the gateway's upstream Anthropic key, so every
anthropic/* model fails the same way regardless of id. That also explains
why cloudflare-docs' bigbonk.yml (anthropic) has never once executed while
its bonk.yml (Workers AI) is green.

Adopting that working pair verbatim: kimi-k2.6 over Workers AI, which needs
no Anthropic credential, on the 1.17.7 they run it against.
@andre-j3sus

Copy link
Copy Markdown
Collaborator Author

Reopening to fire pull_request: [opened] against the Workers AI config.

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

Labels

None yet

1 participant