aimux icon indicating copy to clipboard operation
aimux copied to clipboard

Feature request: Allow setting up profiles with API keys (Microsoft Foundry for example)

Open hummuscience opened this issue 6 months ago • 2 comments

I tried to set it up using the .claude.json and .credentials.json files in the profile. It did not work out (somehow claude did not pick them up). Open exporting the env variable manually before the session worked out.

Shouldnt be too hard. might give it a try later

Closes #2

hummuscience avatar May 09 '26 09:05 hummuscience

Looks like #3 covers this. With per-profile env: in config.yaml and <profile>/.env, you can set CLAUDE_CODE_USE_FOUNDRY / ANTHROPIC_FOUNDRY_API_KEY / etc. on the profile and aimux run foundry injects them into the spawned claude — no manual export. The README has a Foundry recipe in the PR.

@hummuscience could you add Closes #2 to the PR body so this issue closes automatically on merge?

Shahinyanm avatar May 26 '26 12:05 Shahinyanm

Update: this is being implemented in #5. A profile can now point at a 3rd-party / self-hosted Claude-compatible endpoint (Microsoft Foundry, your own gateway, etc.) instead of an OAuth subscription:

aimux profile add myapi --api    # prompts for Base URL, token (hidden), models
aimux run myapi

Credentials live in a per-profile .env (ANTHROPIC_BASE_URL / ANTHROPIC_AUTH_TOKEN), written chmod 600, injected into the spawned claude at launch — exactly the "export env before the session" trick you found, just managed by aimux. It also seeds .claude.json so onboarding is skipped, which is the part that wasn't picking up before.

#5 builds directly on @hummuscience's #3. One small fix left (file-permission on rewrite) and it merges — this issue will close with it.

Shahinyanm avatar Jun 01 '26 05:06 Shahinyanm