Skip to content

refactor: drop ANTHROPIC_* env compat and rename vendor wire names - #426

Merged
dahai80 merged 1 commit into
mainfrom
chore/debrand-compat-drop
Dec 1, 2026
Merged

dahai80 merged 1 commit into
mainfrom
chore/debrand-compat-drop

Conversation

@dahai80

@dahai80 dahai80 commented Dec 1, 2026

Copy link
Copy Markdown
Owner

De-brand layer 2 completion (issue #419): drops all ANTHROPIC_* compatibility keeps. No vendor env vars, no vendor wire names emitted.

Changes

  • Env: ANTHROPIC_API_KEY/BASE_URL/AUTH_TOKEN/MODEL reads removed (16 runtime files). FUSION_CLIENT_KEY / FUSION_BASE_URL / FUSION_MODEL are the only env credentials. The FUSION_* -> ANTHROPIC_* SDK-compat mapping block in cli.tsx and the /doctor env-conflict detector are deleted (no reader remains). The FUSION_ALLOW_ANTHROPIC_TOKEN_LOCAL cloud-token opt-in is deleted (P1: auth chain puts cloud ANTHROPIC_AUTH_TOKEN ahead of local gateway key (live 401 repro) + key has three names — fix precedence, unify naming #221 test now asserts the token is NOT read).
  • File: services/api/claude.ts → services/api/messages.ts.
  • Wire: billing attribution header x-anthropic-billing-header → x-fusion-billing-header (emission side; transcript parsing accepts both names for our own historical sessions). anthropic_beta → fusion_beta, anthropic_internal → fusion_internal (zero consumers anywhere). x-anthropic-additional-protection header dropped (Anthropic-API-only).

Coordination

  • fusion-mlx strips the billing header from system prompts (anthropic_adapter.py); an upstream issue should switch the strip pattern to x-fusion-billing-header (keep the old pattern one release to consume in-flight sessions).

Deferred (commented in #419)

  • claude-* model-id strings — external model identifiers + legacy migration data, not branding
  • fastMode claude_code_penguin endpoint — dead feature, needs a product call on deleting the feature
  • Foundry provider status branch — display-only leftover of a removed provider

Test plan

  • bun run typecheck clean
  • bun test: 1884 pass, 0 fail (9 tests rewritten to new semantics, 1 obsolete test file deleted)
  • bun run lint: 33 warnings = baseline
  • docs validator ERROR 0; bun run build green

🤖 Generated with Claude Code

De-brand layer 2 completion (issue #419): no compatibility keeps.

- ANTHROPIC_API_KEY/BASE_URL/AUTH_TOKEN/MODEL env reads removed —
  FUSION_CLIENT_KEY / FUSION_BASE_URL / FUSION_MODEL are the only env
  credentials; tests rewritten to the new semantics
- delete the FUSION_* -> ANTHROPIC_* SDK-compat mapping in cli.tsx and
  the /doctor env-conflict detector (no ANTHROPIC_* reader remains)
- delete the FUSION_ALLOW_ANTHROPIC_TOKEN_LOCAL opt-in (cloud auth is
  gone; #221 test now asserts the token is NOT read)
- services/api/claude.ts -> services/api/messages.ts
- billing attribution header x-anthropic-billing-header ->
  x-fusion-billing-header (emission); transcript parsing accepts both
  names for our own historical sessions. Engine-side strip rename =
  upstream fusion-mlx issue
- anthropic_beta -> fusion_beta, anthropic_internal -> fusion_internal
  (zero consumers anywhere; engine ignores unknown request fields)
- drop x-anthropic-additional-protection header (Anthropic-API-only)

Deferred (noted in #419): claude-* model-id strings (external model
identifiers + legacy migration data, not branding), fastMode
claude_code_penguin endpoint (dead feature, needs product call),
Foundry provider status branch.

bun test 1884 pass / 0 fail; typecheck, lint (33 = baseline),
validator ERROR 0, build green.

Co-Authored-By: Claude Code <[email protected]>
@dahai80
dahai80 merged commit a103b40 into main Dec 1, 2026
1 check passed
@dahai80
dahai80 deleted the chore/debrand-compat-drop branch December 1, 2026 00:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant