Skip to content

fix: inject placeholder API key for keyless custom endpoints#167

Merged
sallyom merged 1 commit into
sallyom:mainfrom
khaledsulayman:fix/keyless-endpoint-auth
Jun 26, 2026
Merged

fix: inject placeholder API key for keyless custom endpoints#167
sallyom merged 1 commit into
sallyom:mainfrom
khaledsulayman:fix/keyless-endpoint-auth

Conversation

@khaledsulayman

Copy link
Copy Markdown
Contributor

Summary

Changes

  • k8s-helpers.ts: Added KEYLESS_ENDPOINT_PLACEHOLDER constant; updated modelEndpointApiKeyRef resolution to create an env secret ref when modelEndpoint is set even without a key
  • local.ts: Same ref resolution fix; added placeholder env var injection in buildRunArgs()
  • k8s-manifests.ts: Added placeholder to secretManifest() Secret data when endpoint exists but no key is provided
  • Updated existing test and added 3 new regression tests

Test plan

  • npm run build passes
  • npm run lint passes
  • npm test — all server tests pass, including new regression tests
  • Deploy with keyless vLLM endpoint on OpenShift
  • Deploy with keyless endpoint locally via podman/docker
  • Deploy with a real API key and verify it still works

Generated by Claude under the supervision of Khaled Sulayman

Custom endpoints that don't require authentication (e.g., vLLM
InferenceService) fail at startup because no apiKey ref is set in the
provider config and the auth store is never populated.

When a custom endpoint is configured without an API key, inject a
placeholder value ("no-key-required") so OpenClaw's auth requirement
is satisfied. Applies to both local and Kubernetes deployers.

Fixes sallyom#166

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@sallyom sallyom merged commit f20df09 into sallyom:main Jun 26, 2026
4 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.

Custom endpoint deploys without API key fail at startup (keyless auth)

2 participants