Skip to content

[FEATURE] Add llamacpp provider support #160

Description

Summary

inference-gateway/inference-gateway added a new first-class provider, llamacpp (llama.cpp's OpenAI-compatible llama-server), in inference-gateway/inference-gateway#448. The canonical Provider enum in inference-gateway/schemas v0.6.1 now includes llamacpp (keyless: auth_type: none, default URL http://llamacpp:8080/v1).

The operator's provider list is generated from that enum, so it needs a regen to recognize llamacpp.

Why it matters

The operator validates spec.providers[].name in the Gateway CR against SupportedProviders (internal/providers/zz_generated_providers.go, generated by internal/providers/gen/main.go). Until llamacpp is added there, a Gateway CR that declares - name: Llamacpp is rejected.

This is already visible downstream: in the gateway repo's k8s hybrid example (examples/kubernetes/hybrid/gateway.yaml, added in #448) the Llamacpp provider block is committed commented out specifically because the pinned operator release predates this enum entry. Once the operator ships llamacpp, that block can be uncommented and the k8s path becomes one-step.

What to change

  • Regenerate the provider list from schemas v0.6.1 (or later): run the generator (internal/providers/gen) so SupportedProviders in internal/providers/zz_generated_providers.go includes "llamacpp".
  • Cut a release so the gateway's k8s examples can uncomment the Llamacpp provider block.

Acceptance criteria

  • SupportedProviders includes llamacpp
  • A Gateway CR with providers: [{ name: Llamacpp, ... }] validates and reconciles
  • Tests pass
  • Released

Refs

Activity

  1. changed the title [-]feat: add llamacpp provider support[/-] [+][FEATURE] Add llamacpp provider support[/+] on Jul 18, 2026
  2. edenreich commented on Jul 18, 2026

    @edenreich
    Contributor

    @claude Can you work on this?

  3. added
    enhancement
    on Jul 18, 2026
  4. inference-gateway-maintainer commented on Jul 18, 2026

    @inference-gateway-maintainer
    ContributorAuthor

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


    Task: Add llamacpp provider support - done ✅

    • Gather context (generator, schema parser, validation path, tests)
    • Confirm llamacpp enum entry in schemas v0.6.1 / main
    • Update SupportedProviders to include llamacpp
    • Add regression test cases + verify offline tests pass
    • Commit & open PR

    What changed

    • internal/providers/zz_generated_providers.go - added "llamacpp" to SupportedProviders, alphabetically between groq and minimax, matching the canonical schema's components.schemas.Provider.enum. I fetched the live schema (inference-gateway/schemas@main) and confirmed the only difference from the operator's list was llamacpp (15 entries total, no other drift), so this exactly reproduces what the generator would emit.
    • internal/providers/providers_test.go - added IsSupported cases for llamacpp and the capitalized Llamacpp form used in Gateway CRs.

    No CRD regeneration was needed: ProviderSpec.Name has no +kubebuilder:validation:Enum marker, so provider names are validated at runtime via providers.IsSupported (gateway_controller.go:247), which lowercases input - so - name: Llamacpp now validates and reconciles.

    Verification

    • TestIsSupported (incl. the new llamacpp cases) and TestSupportedProvidersHasNoDuplicates pass locally.
    • The network-backed drift guard TestSupportedProvidersMatchSchema couldn't run in this sandbox (outbound network is blocked here), so I verified parity against the live schema by hand; it will run for real in PR CI.
    • Release: automatic - the feat: commit triggers a semantic-release minor bump when the PR merges to main.

    PR & follow-ups

  5. moved this from Todo to In progress in 2026on Jul 18, 2026
  6. moved this from In progress to QA in 2026on Jul 18, 2026
  7. inference-gateway-releaser commented on Jul 19, 2026

    @inference-gateway-releaser
    Contributor

    🎉 This issue has been resolved in version 0.19.0 🎉

    The release is available on GitHub release

    Your semantic-release bot 📦🚀

  8. moved this from QA to Done in 2026on Jul 19, 2026
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

    enhancementreleased

    Projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions