A member is never handed its launcher's ANTHROPIC_BASE_URL or model overrides, so a crew shell on another provider cannot 401 it (martha#102) #129
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Purpose (fix): a Claude Code member that
martha upormartha startlaunches from a shell whose Claude Code runs on another provider's endpoint still reaches Anthropic with its own billing, instead of failing every prompt withPlease run /login · API Error: 401.Found on the 0.4.0 pilot (macula-io/martha#102 c3465). That comment reads the cause as an inherited
ANTHROPIC_AUTH_TOKEN. The launch already drops that variable (f097e80e, martha#916 r=4,NEVER_GIVENinsrc/give_a_member_its_own_config/give_a_member_its_own_config.ts), so the cause is a different variable.What the member is handed, read from
/proc/<pid>/environ(variable names only) of the pilot's live Neptunus, pid 1769248, started from Pluto's crew shell. That shell's Claude Code runs on DeepSeek's Anthropic-compatible endpoint:No
ANTHROPIC_AUTH_TOKENis handed; the drop works. ButANTHROPIC_BASE_URL,ANTHROPIC_MODELandANTHROPIC_SMALL_FAST_MODELpass through. So a member billed by the owner's subscription sends that sign-in to DeepSeek, which answers 401.The fix: a billed member is never handed the launcher's endpoint or model overrides, whichever its billing:
ANTHROPIC_BASE_URL,ANTHROPIC_MODEL,ANTHROPIC_SMALL_FAST_MODEL, next toANTHROPIC_AUTH_TOKENinNEVER_GIVEN. A member's model comes from its declared profile, never from the shell that started it.Not in this package: the
CLAUDE_CODE_*child-session variables (CLAUDECODE, CLAUDE_CODE_SESSION_ID, CLAUDE_CODE_MESSAGING_*) are handed too. No harm from them has been seen; they are noted here only.Refs macula-io/martha#102
Landed: PR 130 (
cb804487) is on mainc02dc1f7. The relay job (9098) was green.Purpose met in code and test: a member billed by the owner's sign-in is no longer handed the launcher's
ANTHROPIC_BASE_URL,ANTHROPIC_MODELorANTHROPIC_SMALL_FAST_MODEL(ENDPOINT_VARIABLES, dropped forBILLED_BY_SUBSCRIPTIONin give_a_member_its_own_config.ts). The test asserts on the environment the member is actually handed.One difference from the fix as written above: r=1 narrowed the drop to members billed by the sign-in. A member billed by API key keeps
ANTHROPIC_BASE_URL, because the recorded-host runs (the CI relay job) reach their stand-in model through it.Not yet observed live: a pilot member started from a crew shell on another provider getting through to Anthropic. That comes with Pluto's restart of the pilot pair (macula-io/martha#102).