Skip to content

fix(anthropic): avoid Fable OAuth system prompt refusal - #6329

Merged
Wei-Shaw merged 1 commit into
Wei-Shaw:mainfrom
heyrry:codex/fix-fable5-oauth-system-prompt
Aug 29, 2026
Merged

fix(anthropic): avoid Fable OAuth system prompt refusal#6329
Wei-Shaw merged 1 commit into
Wei-Shaw:mainfrom
heyrry:codex/fix-fable5-oauth-system-prompt

Conversation

@heyrry

@heyrry heyrry commented Aug 28, 2026

Copy link
Copy Markdown

Summary

  • use the native billing + Claude Code identity system-block shape for Anthropic Fable OAuth requests
  • omit the generic CLI expansion block that makes Fable stop with refusal and zero output tokens
  • preserve the original client system instructions through the existing message-history migration
  • keep the current configured/default system-block behavior unchanged for non-Fable models

Problem

For a non-Claude-Code client routed through an Anthropic OAuth account, claude-fable-5 can return HTTP 200 with an empty public response. The upstream Anthropic SSE contains no content block, reports stop_reason=refusal, and has zero output tokens. The same account, model, and prompt work when the request uses the native billing + Claude Code identity shape.

This affects both the OpenAI-compatible Chat Completions and Responses forwarding paths because both call applyClaudeCodeOAuthMimicryToBody.

Validation

  • make test-unit
  • added a regression test covering the Fable-specific system-block shape and preservation of the original client system instructions
  • sanitized live Anthropic OAuth verification: Chat Completions returned non-empty OK with output tokens; Responses returned non-empty output_text with output tokens

No credentials, account identifiers, deployment configuration, or response content beyond the fixed test token are included.

@github-actions

github-actions Bot commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

All contributors have signed the CLA. ✅
Posted by the CLA Assistant Lite bot.

@heyrry
heyrry force-pushed the codex/fix-fable5-oauth-system-prompt branch from 86ecaf8 to 17e8579 Compare August 28, 2026 08:38
@Wei-Shaw
Wei-Shaw merged commit 32ac921 into Wei-Shaw:main Aug 29, 2026
8 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 29, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants