Skip to content

fix(amd): LiteLLM auth override compose order + contract tests#601

Merged
Lightheartdevs merged 1 commit intomainfrom
fix/litellm-auth-compose-order
Mar 24, 2026
Merged

fix(amd): LiteLLM auth override compose order + contract tests#601
Lightheartdevs merged 1 commit intomainfrom
fix/litellm-auth-compose-order

Conversation

@Lightheartdevs
Copy link
Collaborator

Summary

  • Fix: LITELLM_MASTER_KEY= in docker-compose.amd.yml loaded too early — extensions/services/litellm/compose.yaml loaded after and re-set the key, re-enabling auth. Moved override to extensions/services/litellm/compose.amd.yaml which loads after compose.yaml via GPU overlay discovery.
  • Tests: 17 contract tests covering all AMD/Lemonade integration points. Wired into make test.

Compose load order (AMD)

  1. docker-compose.base.yml
  2. docker-compose.amd.yml
  3. extensions/services/litellm/compose.yaml — sets LITELLM_MASTER_KEY=${LITELLM_KEY:-}
  4. extensions/services/litellm/compose.amd.yaml — blanks LITELLM_MASTER_KEY=wins
  5. extensions/services/litellm/compose.local.yaml

Contract tests (17/17 passing)

Compose files exist, entrypoint absolute path, healthcheck /api/v1/health, auth disabled, no master_key in config, libatomic1 installed, image tag pinned, CTX_SIZE configurable, service registry override, schema allows lemonade, APE healthcheck, compose resolver.

Test plan

  • make test passes (includes new contract tests)
  • AMD/Lemonade: LiteLLM starts without auth, OpenClaw connects
  • NVIDIA: compose.amd.yaml not loaded, auth unchanged

🤖 Generated with Claude Code

…act tests

The LITELLM_MASTER_KEY= override in docker-compose.amd.yml loaded too early —
extensions/services/litellm/compose.yaml loaded after and re-set the key,
re-enabling auth. OpenClaw can't send Bearer tokens → 400.

Fix: New extensions/services/litellm/compose.amd.yaml loads after compose.yaml
via GPU overlay discovery (resolve-compose-stack.sh line 161-163), so the
empty override wins.

Also adds tests/contracts/test-amd-lemonade-contracts.sh (17 contract tests)
covering all AMD/Lemonade integration points. Wired into `make test`.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@Lightheartdevs Lightheartdevs merged commit 68c4838 into main Mar 24, 2026
14 of 21 checks passed
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