fix: replace claude CLI with curl for OpenRouter release notes#15
Merged
fix: replace claude CLI with curl for OpenRouter release notes#15
Conversation
…tion The claude CLI failed silently (exit in ~1s) when proxied through OpenRouter via ANTHROPIC_BASE_URL, causing release notes to always fall back to the default placeholder message. Replaced with a direct curl call to OpenRouter's Messages API, which is more reliable and provides visible error output on failure. Also fixes the model ID (4.6 → 4-6) and uses jq for safe JSON encoding.
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.
Problem
The
Generate release notes with Claudestep inrelease.ymlalways fell back to the default placeholder message instead of producing Claude-generated notes. The step completed in ~1 second — far too fast for a real API call — indicating theclaudeCLI was failing silently due to|| true.Root causes:
claudeCLI (Anthropic's Code CLI) is unreliable when proxied through OpenRouter viaANTHROPIC_BASE_URL|| truesuppressed all errors with no diagnostic outputanthropic/claude-sonnet-4.6used.instead of OpenRouter's expected-separatorFix
Replaced the
claudeCLI call with a directcurlrequest to OpenRouter's Anthropic-compatible Messages API (/v1/messages).Changes:
Install Claude Code CLIstep (no longer needed)curljqto safely encode the prompt as JSON (handles newlines and special chars)curlstderr on failure for diagnosticsanthropic/claude-sonnet-4.6→anthropic/claude-sonnet-4-6OPENROUTER_API_KEYfor clarityTest plan
Releaseworkflow on next version bump and verify the GitHub Release contains Claude-generated notes