Skip to content

docs(llamacpp): add llama.cpp provider documentation - #417

Merged
edenreich merged 9 commits into
mainfrom
fix/issue-416
Jul 18, 2026
Merged

edenreich merged 9 commits into
mainfrom
fix/issue-416

Conversation

@inference-gateway-maintainer

Copy link
Copy Markdown
Contributor

Resolves #416

Summary

Add documentation for the new llama.cpp provider, which was added as a first-class provider in inference-gateway/inference-gateway#448. The llama.cpp provider allows operators to self-host GGUF models via llama-server and reach them through the gateway using the llamacpp/ model prefix.

Changes

  • New page: llamacpp.md - Full provider documentation covering configuration (env vars, Docker Compose), chat completions, SSE streaming, model listing, vision/multimodal, embeddings, and tool/function calling, plus common llama-server startup commands
  • .vitepress/config.ts - Added llama.cpp page to the nav (under Guides) and sidebar (under Core Concepts)
  • index.md - Added llama.cpp to the hero tagline and features description
  • README.md - Added llama.cpp to the provider list
  • supported-providers.md - Added llama.cpp provider example section with chat completion and model listing examples
  • examples.md - Added llama.cpp chat completion example

Add new provider documentation page for llama.cpp, covering configuration, chat completions, streaming, vision, embeddings, and tool calling.

Update navigation (nav and sidebar) to include the new page.

Update index.md, README.md, supported-providers.md, and examples.md to mention llama.cpp in provider lists and usage examples.
@edenreich

Copy link
Copy Markdown
Contributor

@infer CI is failing due to drift, can you fix this?

@inference-gateway-maintainer

inference-gateway-maintainer Bot commented Jul 18, 2026 •

Copy link
Copy Markdown
Contributor Author

Model: ollama_cloud/deepseek-v4-flash · View Job

Todos

  • Understand the drift: run task generate:check locally to see what fails
  • Add llamacpp entry to scripts/provider-overrides.json
  • Run task generate to regenerate generated files
  • Add llamacpp to fixture and update test expectations
  • Run all checks (lint, format, build, test) and commit+push

Pull Request

#417

✅ Infer Result: Success

Everything is clean and all CI checks pass. No further work needed.

Model: ollama_cloud/deepseek-v4-flash · Exit Code: 0 · Duration: 10m 5s

Tokens: 3,358,821 in · 11,497 out · 3,370,318 total (65 requests)

Tool calls: 71 total · 82% success rate

Traces
Session: 1784364130-02dbe03a

session (standard, success)                10m3s
├── chat ollama_cloud/deepseek-v4-flash     2.5s
├── execute_tool Bash                        4ms
├── execute_tool Bash                        5ms
├── chat ollama_cloud/deepseek-v4-flash     2.1s
├── execute_tool Bash                        5ms
├── execute_tool Bash                        3ms
├── chat ollama_cloud/deepseek-v4-flash     2.2s
├── execute_tool Bash                      956ms [error: tool_error]
├── chat ollama_cloud/deepseek-v4-flash     2.0s
├── execute_tool Read                      226µs
├── chat ollama_cloud/deepseek-v4-flash     3.1s
├── execute_tool TodoWrite                  64µs
├── chat ollama_cloud/deepseek-v4-flash     1.9s
├── execute_tool Read                      204µs
├── execute_tool Read                      364µs
├── chat ollama_cloud/deepseek-v4-flash     3.9s
├── execute_tool Grep                      998µs
├── execute_tool Grep                        1ms
├── chat ollama_cloud/deepseek-v4-flash     2.5s
├── chat ollama_cloud/deepseek-v4-flash     2.8s
├── execute_tool Grep                      269µs
├── chat ollama_cloud/deepseek-v4-flash     2.3s
├── execute_tool Bash                      204ms [error: tool_error]
├── chat ollama_cloud/deepseek-v4-flash     3.7s
├── execute_tool TodoWrite                  59µs
├── chat ollama_cloud/deepseek-v4-flash     2.5s
├── chat ollama_cloud/deepseek-v4-flash     2.2s
├── chat ollama_cloud/deepseek-v4-flash     2.9s
├── execute_tool Bash                       44ms [error: tool_error]
├── chat ollama_cloud/deepseek-v4-flash     4.2s
├── execute_tool Grep                      335µs
├── chat ollama_cloud/deepseek-v4-flash     2.4s
├── execute_tool Read                      260µs
├── chat ollama_cloud/deepseek-v4-flash     5.8s
├── execute_tool Bash                      303ms [error: tool_error]
├── chat ollama_cloud/deepseek-v4-flash     2.0s
├── execute_tool Bash                      332ms
├── chat ollama_cloud/deepseek-v4-flash     2.5s
├── execute_tool Bash                       36ms [error: tool_error]
├── chat ollama_cloud/deepseek-v4-flash     2.4s
├── execute_tool Bash                      294ms
├── chat ollama_cloud/deepseek-v4-flash     2.4s
├── execute_tool Bash                      259ms
├── chat ollama_cloud/deepseek-v4-flash     2.9s
├── execute_tool Bash                      273ms
├── chat ollama_cloud/deepseek-v4-flash     2.9s
├── execute_tool Bash                      245ms [error: tool_error]
├── chat ollama_cloud/deepseek-v4-flash     3.3s
├── execute_tool Bash                      358ms
├── chat ollama_cloud/deepseek-v4-flash     2.5s
├── execute_tool Bash                      397ms
├── chat ollama_cloud/deepseek-v4-flash     2.3s
├── execute_tool Bash                      311ms
├── chat ollama_cloud/deepseek-v4-flash     3.8s
├── execute_tool Edit                      324µs
├── chat ollama_cloud/deepseek-v4-flash     3.3s
├── execute_tool TodoWrite                  64µs
├── chat ollama_cloud/deepseek-v4-flash     2.2s
├── execute_tool Bash                       1.4s
├── chat ollama_cloud/deepseek-v4-flash     5.5s
├── execute_tool Bash                        7ms
├── chat ollama_cloud/deepseek-v4-flash     4.6s
├── execute_tool TodoWrite                  70µs
├── chat ollama_cloud/deepseek-v4-flash     3.3s
├── execute_tool Bash                       1.9s
├── execute_tool Bash                       4.0s
├── chat ollama_cloud/deepseek-v4-flash     3.0s
├── execute_tool Bash                      20.7s
├── chat ollama_cloud/deepseek-v4-flash     3.3s
├── execute_tool Bash                       1.3s [error: tool_error]
├── chat ollama_cloud/deepseek-v4-flash     3.7s
├── execute_tool Bash                        4ms
├── chat ollama_cloud/deepseek-v4-flash     2.5s
├── execute_tool Bash                       10ms
├── chat ollama_cloud/deepseek-v4-flash     2.8s
├── execute_tool Bash                       11ms
├── chat ollama_cloud/deepseek-v4-flash     3.1s
├── execute_tool Bash                       1.2s
├── chat ollama_cloud/deepseek-v4-flash     2.3s
├── execute_tool Bash                        4ms
├── chat ollama_cloud/deepseek-v4-flash     3.0s
├── execute_tool Wait                      14.6s [error: tool_error]
├── chat ollama_cloud/deepseek-v4-flash     2.8s
├── execute_tool Bash                      675ms [error: tool_error]
├── chat ollama_cloud/deepseek-v4-flash     4.0s
├── execute_tool Bash                      838ms [error: tool_error]
├── chat ollama_cloud/deepseek-v4-flash     3.3s
├── execute_tool Wait                      627ms [error: tool_error]
├── chat ollama_cloud/deepseek-v4-flash     2.5s
├── chat ollama_cloud/deepseek-v4-flash     2.7s
├── execute_tool Bash                      742ms [error: tool_error]
├── chat ollama_cloud/deepseek-v4-flash     3.6s
├── execute_tool Bash                       1.6s
├── chat ollama_cloud/deepseek-v4-flash     2.4s
├── execute_tool Read                      187µs
├── chat ollama_cloud/deepseek-v4-flash     4.2s
├── execute_tool TodoWrite                  69µs
├── chat ollama_cloud/deepseek-v4-flash     4.9s
├── chat ollama_cloud/deepseek-v4-flash     3.8s
├── execute_tool Edit                      383µs
├── chat ollama_cloud/deepseek-v4-flash     4.5s
├── execute_tool Edit                      364µs
├── chat ollama_cloud/deepseek-v4-flash     3.7s
├── execute_tool Edit                      326µs
├── chat ollama_cloud/deepseek-v4-flash     4.7s
├── execute_tool Bash                       38ms
├── chat ollama_cloud/deepseek-v4-flash     4.4s
├── execute_tool Bash                       2.0s
├── execute_tool Bash                       4.0s
├── chat ollama_cloud/deepseek-v4-flash     3.2s
├── execute_tool Bash                      20.2s
├── chat ollama_cloud/deepseek-v4-flash     3.9s
├── execute_tool Bash                        4ms
├── chat ollama_cloud/deepseek-v4-flash     5.4s
├── execute_tool Bash                        9ms
├── chat ollama_cloud/deepseek-v4-flash     7.6s
├── execute_tool Bash                       1.1s
├── chat ollama_cloud/deepseek-v4-flash     3.9s
├── execute_tool Bash                        5ms
├── chat ollama_cloud/deepseek-v4-flash     3.8s
├── execute_tool Wait                       5m0s [error: tool_error]
├── chat ollama_cloud/deepseek-v4-flash     3.4s
├── execute_tool Bash                      638ms
├── chat ollama_cloud/deepseek-v4-flash     3.8s
├── execute_tool TodoWrite                  98µs
├── chat ollama_cloud/deepseek-v4-flash     4.7s
├── chat ollama_cloud/deepseek-v4-flash     3.8s
├── execute_tool Bash                        4ms
├── chat ollama_cloud/deepseek-v4-flash     3.4s
├── chat ollama_cloud/deepseek-v4-flash     3.2s
╰── chat ollama_cloud/deepseek-v4-flash     3.7s
Stats
Tool Calls

╭───────────┬───────┬───────┬──────────╮
│ Tool      │ Calls │ Fail% │ Avg      │
├───────────┼───────┼───────┼──────────┤
│ Bash      │ 42    │ 24%   │ 1580ms   │
│ TodoWrite │ 6     │ 0%    │ 0ms      │
│ Read      │ 5     │ 0%    │ 0ms      │
│ Grep      │ 4     │ 0%    │ 0ms      │
│ Edit      │ 4     │ 0%    │ 0ms      │
│ Wait      │ 3     │ 100%  │ 105083ms │
╰───────────┴───────┴───────┴──────────╯

Token Usage

╭────────────────────────────────┬─────────┬────────────┬─────────┬──────╮
│ Model                          │ Prompt  │ Completion │ Total   │ Cost │
├────────────────────────────────┼─────────┼────────────┼─────────┼──────┤
│ ollama_cloud/deepseek-v4-flash │ 3519749 │ 11558      │ 3531307 │ -    │
╰────────────────────────────────┴─────────┴────────────┴─────────┴──────╯

Sessions

╭───────────┬──────────┬──────────╮
│ Execution │ Mode     │ Sessions │
├───────────┼──────────┼──────────┤
│ headless  │ standard │ 1        │
╰───────────┴──────────┴──────────╯
⚠️ 13 log(s)
  • Bash:
    exit status 1: Docs drift	fail	8s	https://github.com/inference-gateway/docs/actions/runs/29637823086/job/88063142386	
    Analyze (actions)	pass	42s	https://github.com/inference-gateway/docs/actions/runs/29637822571/job/88063141649	
    … (truncated)
    
  • Bash:
    exit status 201: �[32mtask: [generate] bun scripts/generate-provider-docs.mjs
    �[0mgenerate-provider-docs: The schema defines provider(s) with no entry in scripts/provider-overrides.json: llamacpp. Add them (displayName, urlLabel, keyLabel, and vision if the provider supports it) and re-run.
    … (truncated)
    
  • Bash:
    exit status 1: Unknown JSON field: "defaultBranch"
    Available fields:
    … (truncated)
    
  • Bash:
    exit status 1: HTTP 422: ERROR_TYPE_QUERY_PARSING_FATAL unable to parse query! (https://api.github.com/search/code?page=1&per_page=30&q=llamacpp+--limit+5+repo%3Ainference-gateway%2Fschemas)
    
  • Bash:
    exit status 1: invalid argument ".yaml" for "--match" flag: valid values are {file|path}
    
    … (truncated)
    
  • Bash:
    exit status 1: template: :1:8: executing "" at <.textMatches>: can't evaluate field textMatches in type []interface {}
    
  • Bash:
    exit status 201: �[32mtask: [generate] bun scripts/generate-provider-docs.mjs
    �[0mGenerated 15 providers (openai, deepseek, anthropic, cohere, groq, cloudflare, ollama, ollama_cloud, google, mistral, minimax, moonshot, nvidia, llamacpp, zai) from https://raw.githubusercontent.com/inference-gateway/schemas/main/openapi.yaml.
    … (truncated)
    
  • Wait:
    check command failed with exit code 1 (not in pending_exit_codes)
    
  • Bash:
    exit status 1: Docs drift	fail	11s	https://github.com/inference-gateway/docs/actions/runs/29637973886/job/88063541279	
    Analyze (actions)	pending	0	https://github.com/inference-gateway/docs/actions/runs/29637972736/job/88063539270	
    … (truncated)
    
  • Bash:
    exit status 1: run 29637973886 is still in progress; logs will be available when it is complete
    
  • Wait:
    check command failed with exit code 1 (not in pending_exit_codes)
    
  • Bash:
    exit status 1: Docs drift	fail	11s	https://github.com/inference-gateway/docs/actions/runs/29637973886/job/88063541279	
    Build	pass	30s	https://github.com/inference-gateway/docs/actions/runs/29637973886/job/88063541284	
    … (truncated)
    
  • Wait:
    check command failed with exit code -1 (not in pending_exit_codes)
    

Triggered by edenreich · Infer Action

… docs

The schema in inference-gateway/schemas already defines the llamacpp provider, but provider-overrides.json was missing an entry, causing the docs-drift CI check to fail. Added the override entry and ran task generate to regenerate all generated regions (providers table, vision list, ADK tables, config sections).
…pectations

The offline regression test (bun test) uses the fixture schema, not the live schema. Added llamacpp to the fixture's enum and x-provider-configs, and updated the expected provider ID list in the test to include llamacpp.
Comment thread .vitepress/config.ts Resolved
The llama.cpp Provider link was incorrectly placed as a standalone item in the nav's Guides dropdown. It already belongs in the sidebar under Core Concepts alongside Supported Providers, which is the dedicated section for provider documentation.
Comment thread .vitepress/config.ts Resolved
Comment thread llamacpp.md Resolved
@edenreich
edenreich marked this pull request as ready for review July 18, 2026 09:07
@edenreich
edenreich requested a review from a team as a code owner July 18, 2026 09:07
@inference-gateway-maintainer inference-gateway-maintainer Bot moved this to Todo in 2026 Jul 18, 2026
@edenreich

Copy link
Copy Markdown
Contributor

@claude Can you update the docs? llamacpp and ollama are actually not an API key based, the important part is that the user can modify the URL - OLLAMA_API_URL and LLAMACPP_API_URL. Please adjust based on the changes. use /ponytail:ponytail

@inference-gateway-maintainer

inference-gateway-maintainer Bot commented Jul 18, 2026 •

Copy link
Copy Markdown
Contributor Author

Claude finished @edenreich's task in 6m 21s —— View job


Done: llama.cpp is now URL-based (keyless), like Ollama

Root cause: auth_type and the default URL are schema-driven facts, not hand-edited. The upstream inference-gateway/schemas@main already marks llama.cpp auth_type: none at http://llamacpp:8080/v1, but the committed docs were still on the stale bearer / port 8000. So this was a drift fix - regenerate, don't hand-edit.

  • Traced auth type through the generator (schema -> overrides -> docs)
  • Confirmed upstream schema: llamacpp and ollama are both auth_type: none (llamacpp URL now :8080)
  • Added the required adkKeyNote for llamacpp in provider-overrides.json (the generator mandates it for keyless providers) and synced the offline fixture
  • Ran task generate against the live schema to regenerate the four doc files
  • Checks: bun test 10/10, format:check clean, lint:md clean, build OK
  • Committed 3ef39da

What changed (all generated from the schema):

File llama.cpp before -> after
supported-providers.md Bearer Token -> Optional API key; URL :8000 -> :8080
configuration.md LLAMACPP_API_URL default :8000 -> :8080
rust-adk.md / typescript-adk.md API-key cell -> none (set A2A_AGENT_CLIENT_BASE_URL to your llama-server)

Ollama already read as keyless (Optional API key, URL-based), so it needed no change - llama.cpp now matches it. The LLAMACPP_API_URL / OLLAMA_API_URL env vars remain the emphasis for both.

Note: source of truth is the upstream schema. CI's drift check (task generate:check) fetches it live and will pass as long as @main stays keyless/:8080 - which it currently is.
· branch fix/issue-416

Comment thread rust-adk.md Resolved
Per review feedback, swap ollama and ollama_cloud and move llamacpp after ollama so the three local/self-hosted providers appear together in a logical order.
@edenreich
edenreich merged commit 356f9ac into main Jul 18, 2026
1 check passed
@edenreich
edenreich deleted the fix/issue-416 branch July 18, 2026 19:37
@edenreich edenreich moved this from Todo to Done in 2026 Jul 18, 2026
inference-gateway-releaser Bot added a commit that referenced this pull request Jul 18, 2026
## [0.9.2](0.9.1...0.9.2) (2026-07-18)

### 📚 Documentation

* add CLI telemetry documentation for traces, logs, and metrics ([#392](#392)) ([f8bfcdc](f8bfcdc))
* **adk:** align telemetry docs with A2A_TELEMETRY_ENABLE as single trace gate ([#403](#403)) ([fea405f](fea405f)), references [inference-gateway/adk#234](inference-gateway/adk#234)
* **adl-cli,adk:** document OTel service.name/service.version from ADL manifest metadata ([#408](#408)) ([be1b66e](be1b66e))
* **adl-cli:** move generated skills to .agents/skills layout ([#421](#421)) ([2e4e925](2e4e925))
* align ADK telemetry config with OpenTelemetry ([#400](#400)) ([aa0a862](aa0a862))
* **cli-channels:** document channels-manager OTLP telemetry setup ([#415](#415)) ([283ddff](283ddff))
* **cli,a2a:** document A2A agent liveness probes ([#425](#425)) ([5844ea9](5844ea9)), closes [#424](#424)
* **cli:** document distributed tracing - infer traces, telemetry.receiver_address, a2a-traces example ([#406](#406)) ([4fc24f5](4fc24f5)), references [inference-gateway/cli#909](inference-gateway/cli#909)
* document /tasks output panel and agent inherit_mock ([#388](#388)) ([7f3d72b](7f3d72b))
* document built-in skills and tmux skill ([#386](#386)) ([fc013ab](fc013ab))
* document extended spec.telemetry otel exporter fields ([#399](#399)) ([712f6de](712f6de))
* document infer traces command and /traces shortcut ([#393](#393)) ([b938a19](b938a19))
* document infer-action workflow for infer orchestrator ([#396](#396)) ([4e1d792](4e1d792))
* document W3C trace propagation and OTLP span ingestion ([#394](#394)) ([f26494c](f26494c))
* **llamacpp:** add llama.cpp provider documentation ([#417](#417)) ([356f9ac](356f9ac))
* note Go SDK retry cancellation preserves HTTP error ([#382](#382)) ([e39bcab](e39bcab))
* **observability:** document OTEL_METRICS_EXPORTER and Prometheus pull env vars ([#412](#412)) ([b450177](b450177)), closes [#409](#409)
* **operator:** add Orchestrator CRD telemetry reference ([#413](#413)) ([8210e06](8210e06))
* **rust-adk:** document A2A_OTEL_TRACES_EXPORTER trace gating ([#407](#407)) ([29c5f67](29c5f67))
* **sdks:** add llamacpp to supported providers list ([#422](#422)) ([ed2a466](ed2a466))
* **sdks:** document python responses api and zai provider ([#423](#423)) ([c5b608e](c5b608e))

### 🔧 Miscellaneous

* **deps-dev:** bump the bun group with 2 updates ([#384](#384)) ([fc813d8](fc813d8))
* **deps:** bump infer CLI v0.141.0 -> v0.147.1 ([#411](#411)) ([03b6342](03b6342))
* **release:** update GitHub App credentials to use RELEASER_APP_ID and RELEASER_APP_PRIVATE_KEY ([4275006](4275006))
@inference-gateway-releaser

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 0.9.2 🎉

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

Labels

released Shipped in a release

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

[DOCS] Add llama.cpp provider documentation

1 participant