Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(usage): keep one email in two Claude orgs as two accounts #14750

ClosedBombatomica64(GitHub profile, opens in a new tab)wants to merge 7 commits intomain fromrefs/pull/14750/headopened View on GitHub

Showing 10 changed files with 10 additions and 2 deletions (loading 7).

x
0 of 10 viewed, 10 left
8 additions and 1 deletionapps/server/src/provider/Drivers/ClaudeDriver.tsModified
View file
@@ -198,7 +198,14 @@
capacity: 1,
timeToLive: CAPABILITIES_PROBE_TTL,
lookup: () =>
- probeClaudeCapabilities(effectiveConfig, processEnv, cwd).pipe(
+ Effect.all([
+ probeClaudeCapabilities(effectiveConfig, processEnv, cwd),
+ ClaudeResetCredits.readClaudeOrganizationId(accountConfigPath),
+ ]).pipe(
+ Effect.map(([capabilities, accountId]) =>
+ capabilities ? { ...capabilities, accountId } : capabilities,
+ ),
+ Effect.provideService(FileSystem.FileSystem, fileSystem),
Effect.provideService(Path.Path, path),
});
1 addition and 1 deletionapps/server/src/provider/testing/ClaudeCapabilitiesProbe.fixture.mjsModified
View file
@@ -42,7 +42,7 @@
output_style: "default",
available_output_styles: ["default"],
models: [],
- account: { email: "dev@example.com", subscriptionType: "pro", tokenSource: "oauth" },
+ account: { email: "dev@example.com", organization: "Acme", subscriptionType: "pro", tokenSource: "oauth" },
});
// The probe follows initialize with get_usage on the same process.