ci: unbreak Bonk (switch to Workers AI) - #149
Open
andre-j3sus wants to merge 6 commits into
Open
Conversation
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.
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.
kimi-k2.6 came from copying the cloudflare-docs config. kimi-k2.7-code is the code-optimized variant of the same family, at identical input and output pricing: +21.8% on Kimi Code Bench v2, +11.0% on Program Bench, and 30% fewer reasoning tokens. Cached input is $0.19/M against $0.16/M, which the token reduction should more than cover. Upstream states API usage is unchanged, and k2.6 is not deprecated, so reverting is a one-token change if this regresses.
Records the two things that are not evident from the workflow file: the Anthropic provider is unusable through this gateway, and comment-triggered runs execute main's copy of the workflow, so changes to it cannot be verified with /bonk on a PR.
k2.7-code wins on coding benchmarks but does not follow the review prompt. Measured on this PR: k2.6 2-line diff 10 loops full structured review k2.7-code 2-line diff 5 loops "LGTM!" k2.7-code 20-line diff 7 loops "LGTM!" The prompt asks it to summarize the change and flag issues; k2.7-code skips the summary regardless of diff size. Its advertised 30% reduction in reasoning tokens appears to cost exactly the analysis we want. Benchmarks measured coding ability, not instruction-following, and the latter is what a review bot needs.
|
This PR resolves three stacked failures in the Bonk workflow:
The PR also adds an "AI review (Bonk)" section to I reviewed both the workflow YAML and the markdown diff. The YAML syntax is valid, secrets usage is unchanged, job permissions are still correctly restrictive ( LGTM! |
andre-j3sus
marked this pull request as ready for review
August 24, 2026 22:01
andre-j3sus
requested review from
HenriqueSFernandes,
carlosefr and
devandrepascoa
and removed request for
HenriqueSFernandes,
carlosefr and
devandrepascoa
August 24, 2026 22:01
devandrepascoa
approved these changes
Aug 24, 2026
This was referenced Aug 24, 2026
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bonk has failed on every run since 2026-08-18. Three faults stacked, each
hiding the next.
The pinned OpenCode 1.15.13 reported nothing on failure — empty comment, no
error in the logs — which is why this went unnoticed for three weeks. Bumping
it surfaced the second fault:
claude-opus-4-8is not a valid id, the versioncomponent is dot-separated. Fixing that reached the provider and exposed the
real one:
The
CF_AI_GATEWAY_*secrets are fine; the gateway's upstream Anthropic key isnot, so every
anthropic/*model fails regardless of id. That also explains whycloudflare-docs'
bigbonk.yml(anthropic) has never executed while itsbonk.yml(Workers AI) is green.So this moves to Workers AI on the same
kimi-k2.6/ 1.17.7 pair cloudflare-docsruns green. The code-optimized
kimi-k2.7-codewas tried and reverted: it winson coding benchmarks but answers
LGTM!without the summary the prompt asksfor, on a 2-line diff and a 20-line one alike. Its advertised 30% reduction in
reasoning tokens seems to cost exactly the analysis a review wants.
AGENTS.md picks up the two things that are not evident from the workflow file:
the Anthropic provider is unusable through this gateway, and comment-triggered
runs execute main's copy of the workflow, so changes to it cannot be verified
with
/bonkon a PR.One cosmetic leftover: the
titlesub-agent still defaults to Anthropic andlogs an error, which does not affect the review.