Skip to content

[DOCS] Document llamacpp LLAMACPP_API_KEY bearer auth #436

Closed

Description

Summary

User-facing behavior change: the llamacpp provider now supports bearer authentication. Following inference-gateway/schemas#128 (fixes inference-gateway/schemas#127), setting LLAMACPP_API_KEY makes the gateway forward it as Authorization: Bearer <key> to the llama.cpp server. Previously the key was accepted as config but silently ignored, so authenticated llama.cpp servers (started with --api-key) returned 401 Invalid API Key.

The key remains optional: when LLAMACPP_API_KEY is empty or unset, no Authorization header is sent, so local/unauthenticated llama.cpp deployments are unaffected.

Affected pages

  • Provider configuration / supported providers docs for llama.cpp - document that LLAMACPP_API_KEY is now honored and is required when the llama.cpp server is started with --api-key.
  • Any environment-variable reference listing LLAMACPP_API_KEY.

Links

Activity

  1. added
    documentation
    on Jul 19, 2026
  2. edenreich commented on Jul 19, 2026

    @edenreich
    Contributor

    @claude Can you adjust the docs?

  3. moved this to Todo in 2026on Jul 19, 2026
  4. added theissue type on Jul 19, 2026
  5. inference-gateway-maintainer commented on Jul 19, 2026

    @inference-gateway-maintainer
    ContributorAuthor

    Claude finished @edenreich's task in 10m 4s —— View job • docs/issue-436-20260719-1637 • [Create PR ➔](https://github.com/inference-gateway/docs/compare/main...docs/issue-436-20260719-1637?quick_pull=1&title=Issue%20%23436%3A%20Changes%20from%20Claude&body=This%20PR%20addresses%20issue%20%23436%0A%0AGenerated%20with%20%5BClaude%20Code%5D(https%3A%2F%2Fclaude.ai%2Fcode)


    Task: Document llamacpp LLAMACPP_API_KEY bearer auth

    • Read repo context (CLAUDE.md, generated-vs-authored regions)
    • Locate where LLAMACPP_API_KEY / llama.cpp auth is documented
    • Determine if change is generated (schema) or hand-authored prose
    • Adjust the docs
    • Validate locally (build / lint / prettier / test)
    • Commit and open PR

    Summary

    The provider docs are generated from the canonical inference-gateway/schemas openapi.yaml, which now sets llama.cpp auth_type: bearer (was none, per schemas#128). The committed docs had drifted and still showed "Optional API key", so this is a regeneration plus a hand-authored note - not just prose.

    Changes (PR #437):

    • Regenerated the provider-derived regions from the real schema (offline, via the generator's --schema-file):
      • supported-providers.md provider matrix: llama.cpp Auth Optional API key -> Bearer Token
      • rust-adk.md + typescript-adk.md "Switching providers and models" table: llama.cpp API-key cell now LLAMACPP_API_KEY
    • Removed the now-dead, inaccurate adkKeyNote override for llama.cpp in scripts/provider-overrides.json
    • Synced the offline regression fixture scripts/__fixtures__/openapi.sample.yaml to llama.cpp auth_type: bearer so bun test stays green
    • Added a note in the llama.cpp section of supported-providers.md: LLAMACPP_API_KEY is optional, is forwarded as Authorization: Bearer <key> when llama-server runs with --api-key, and is omitted otherwise (existing local deployments unaffected)

    Validation (all green): bun test (11 pass), bun run format:check, bun run build, bun run lint:md.

    configuration.md and sdks.md were intentionally not changed - their generated regions do not depend on auth_type.

    PR: #437

    • branch docs/issue-436-20260719-1637
  6. moved this from Todo to In progress in 2026on Jul 19, 2026
  7. moved this from In progress to QA in 2026on Jul 19, 2026
  8. moved this from QA to Done in 2026on Jul 19, 2026
  9. inference-gateway-releaser commented on Jul 22, 2026

    @inference-gateway-releaser
    Contributor

    🎉 This issue has been resolved in version 0.9.3 🎉

    The release is available on GitHub release

    Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationreleased

    Type

    Projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions