Repository navigation
feat: de-brand layer 1+2 — neutral protocol naming, remove Anthropic hosted-service paths - #420
Merged
Merged
Conversation
…hosted-service paths (#419) Layer 1 (naming/branding): - Rename src/types/anthropic-protocol.ts to messages-protocol.ts; update all imports - capability.ts: replace hardcoded model-name substring heuristics with semantic family/generation parsing (parseModelId, isLegacyGeneration, version compare); behavior-preserving for all current canonical ids - Rename claudeCodeGuideAgent.ts to fusionGuideAgent.ts; repurpose to Fusion-Code-only docs (agent type fusion-guide); drop platform.claude.com docs-map fetch - Rename claudemd-parser package export to project-md-parser - Neutralize user-visible strings and comments referencing Claude Code / claude.ai / Anthropic (UI messages, MCP panel header, PR attribution template, availability docs) Layer 2 (Anthropic network paths removed; no default provider): - oauth.ts: drop getOauthConfig/PROD_OAUTH_CONFIG (api.anthropic.com) and MCP_CLIENT_METADATA_URL (claude.ai CIMD doc); MCP CIMD now env-only, falls back to DCR - seam.ts: no default base URL — FUSION_BASE_URL/ANTHROPIC_BASE_URL required, clear error otherwise - upstreamproxy: disabled without explicit base URL - WebFetch: drop hosted domain_info blocklist preflight (SSRF checks and permission flow unchanged) - policy limits / fast mode / OAuth profile: env-configurable endpoints (FUSION_POLICY_LIMITS_URL / FUSION_FAST_MODE_STATUS_URL / FUSION_PROFILE_API_URL), fail-open/skip without them - voice streaming STT: requires VOICE_STREAM_BASE_URL, no hosted default - apiPreconnect: skip without FUSION_BASE_URL; renamed preconnectApi - GrowthBook: no hosted default; requires FUSION_CODE_GB_BASE_URL - Remove OAUTH_BETA_HEADER emission (http.ts, betas.ts) Layer 3 (wire protocol, model ids, env-var compat, stored-token machinery) intentionally kept per issue scope decision; full subscriber/OAuth token machinery removal is follow-up work. Verification: tsc 0 errors; lint no new diagnostics vs main; layer-lint + feature-flags green; build green; tests 1312 unit + 529 integration + 79 web all pass. Closes #419 Co-Authored-By: Claude Code <[email protected]>
This was referenced Nov 30, 2026
Closed
Merged
dahai80
added a commit
that referenced
this pull request
Dec 1, 2026
…leftover docs Completes the remaining layer-1 items from issue #419 on top of #420: - namespace Anthropic -> Messages in messages-protocol.ts (+94 dotted usages; default export alias AnthropicDefault -> MessagesDefault) - flatten the redundant Beta.Messages nesting (types are already Beta-prefixed; the inner namespace shadowed the outer Messages and created circular type aliases) - delete src/claude-api/ (orphaned upstream integration note, the only file still carrying Claude Code brand strings in src/) - CostThresholdDialog: 'Anthropic API' -> neutral cost-cap title - neutral wording in withRetry/compact comments Live Anthropic network calls were already zero after #420 (remaining refs are wire-format field names, kept per the layer-3 decision). ANTHROPIC_API_KEY env fallback stays as interop compat for users with existing keys. Co-Authored-By: Claude Code <[email protected]>
5 tasks done
dahai80
added a commit
that referenced
this pull request
Dec 1, 2026
…leftover docs (#424) Completes the remaining layer-1 items from issue #419 on top of #420: - namespace Anthropic -> Messages in messages-protocol.ts (+94 dotted usages; default export alias AnthropicDefault -> MessagesDefault) - flatten the redundant Beta.Messages nesting (types are already Beta-prefixed; the inner namespace shadowed the outer Messages and created circular type aliases) - delete src/claude-api/ (orphaned upstream integration note, the only file still carrying Claude Code brand strings in src/) - CostThresholdDialog: 'Anthropic API' -> neutral cost-cap title - neutral wording in withRetry/compact comments Live Anthropic network calls were already zero after #420 (remaining refs are wire-format field names, kept per the layer-3 decision). ANTHROPIC_API_KEY env fallback stays as interop compat for users with existing keys. Co-authored-by: Claude Code <[email protected]>
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
Issue #419: ~995 textual Anthropic/Claude references remained after the SDK decoupling. Scope per the issue: layer 1 (naming/branding) + layer 2 (Anthropic network paths). Layer 3 (internal Messages wire protocol) intentionally stays.
Changes
Layer 1 — naming / branding
src/types/anthropic-protocol.ts→src/types/messages-protocol.ts; all 107 imports + one test comment updatedsrc/services/llm/capability.ts: hardcodedincludes("claude-opus-4")-style heuristics replaced with semantic detection —parseModelId()extracts family (opus/sonnet/haiku) + major/minor generation,isLegacyGeneration()+ version comparison drive thinking/ISP/context-management/structured-output. Behavior-preserving for every current canonical id (e.g. gen-3 → false, 4.1+ → structured output)claudeCodeGuideAgent.ts→fusionGuideAgent.ts; agent typeclaude-code-guide→fusion-guide; prompt repurposed to Fusion-Code docs only; theplatform.claude.com/llms.txtfetch and docs-map path dropped./claudemd-parser→./project-md-parser(src/lib/project-md-parser/, test renamed)/usagestub, MCP panel section header, credit-balance error (provider billing link removed), PR attribution template (Fusion Code), availability docs, misc commentsLayer 2 — Anthropic network paths (product decisions embedded, flagged below)
constants/oauth.ts:getOauthConfig()/ prodapi.anthropic.comconfig andMCP_CLIENT_METADATA_URL(claude.ai CIMD doc) removed.MCP CIMDnow env-only (MCP_OAUTH_CLIENT_METADATA_URL), falls back to Dynamic Client Registrationseam.tsrequiresFUSION_BASE_URL/ANTHROPIC_BASE_URLand throws a clear error without it;upstreamproxydisabled without a base URL;apiPreconnectskipped (renamedpreconnectApi)WebFetchTool: hostedapi.anthropic.com/api/web/domain_infoblocklist preflight dropped (issue offered this option). Local SSRF IP checks + permission flow unchanged;skipWebFetchPreflightnow a compatibility no-opFUSION_POLICY_LIMITS_URL), fast mode status (FUSION_FAST_MODE_STATUS_URL), OAuth profile reader (FUSION_PROFILE_API_URL), voice streaming STT (VOICE_STREAM_BASE_URL), GrowthBook (FUSION_CODE_GB_BASE_URL)anthropic-betaOAuth header emission removed (http.ts,betas.ts)Deferred (out of this PR, per issue scope note)
anthropic-version+ functional beta headers, model-id strings,ANTHROPIC_*env compat,CLAUDE.mdconventions — keptclaudeAiLimitsratelimit parsing,isClaudeAISubscribercallers, keychain token storage) — stored-token compat, follow-up PRplatform.claude.comin WebFetch preapproved domains (fetches docs, not a network path we call programmatically)Reviewer attention
anthropic-version/functional beta headers kept as wire protocol (layer 3 note in issue conflicts with its layer-2 checkbox; followed the "NOT rewriting the protocol layer" scope decision)docs/model-providers.mdupdated to "no default provider" — direct connect now requiresFUSION_BASE_URLfusion_guideagent expectscode.fusion-mlx.com/docs/en/fusion_code_docs_map.md(path renamed fromclaude_code_docs_map.md) — fusion-site needs to serve it (will file cross-repo issue if wanted)Test results
bun run typecheck: 0 errorsbun run lint: no new diagnostics vs main (33 warnings baseline unchanged)bun run check: layer-lint, reverse-boundary, feature-flags (79=79), build all greensrc/__tests__1312 pass /tests/529 pass /web79 pass, 0 failCloses #419
🤖 Generated with Fusion Code