mirror of
https://github.com/lukaszraczylo/traefik-llmgateway.git
synced 2026-11-26 10:06:31 +00:00
Document the prompt-caching feature in the README. Add promptCache key to the openai provider in the catalog testData, and update the manifest test mirror.
62 lines
2.1 KiB
YAML
62 lines
2.1 KiB
YAML
displayName: LLM Gateway
|
|
type: middleware
|
|
import: github.com/lukaszraczylo/traefik-llmgateway
|
|
# basePkg: Traefik's Yaegi middleware loader (pkg/plugins/middlewareyaegi.go,
|
|
# newYaegiMiddlewareBuilder) binds the interpreted package under
|
|
# strings.ReplaceAll(path.Base(import), "-", "_") — "traefik_llmgateway" —
|
|
# unless this field overrides it. The package itself declares
|
|
# `package traefikllmgateway` (no underscore), so without this override a
|
|
# real Traefik instance fails plugin load with
|
|
# `failed to eval New: ...: undefined: traefik_llmgateway`, discovered
|
|
# running the plugin in real Traefik v3.5 for the first time (Task 15's
|
|
# integration suite). Required for both Traefik itself and the Plugin
|
|
# Catalog analyzer (piceus), which uses this identical mechanism.
|
|
basePkg: traefikllmgateway
|
|
summary: Multi-provider LLM gateway with groups, per-user keys, token/cost limits, smart routers, MCP/A2A proxy.
|
|
testData:
|
|
providers:
|
|
openai:
|
|
type: openai
|
|
apiKey: test-key
|
|
promptCache:
|
|
key: true
|
|
models:
|
|
- gpt-test
|
|
- gpt-test-large
|
|
decider:
|
|
type: openai
|
|
apiKey: test-key
|
|
models:
|
|
- decider-test
|
|
pathBaseUrls:
|
|
/v1/decide: http://decider.example.invalid
|
|
groups:
|
|
default:
|
|
providers: []
|
|
users:
|
|
inline:
|
|
- name: tester
|
|
group: default
|
|
apiKey: test-user-key
|
|
# Prometheus text-exposition endpoint — see README.md#metrics. No
|
|
# allowedCIDRs here deliberately: this is the catalog-facing smoke-test
|
|
# config, and README.md#metrics has the full CIDR-sizing guidance
|
|
# (narrowest block only, never a whole RFC1918 range) that a
|
|
# copy-pasted example here would risk skipping past.
|
|
metrics:
|
|
enabled: true
|
|
# Two-tier smart router with the v2 classifier and a shadow decision model, see README.md#smart-routers.
|
|
smartRouters:
|
|
auto:
|
|
classifier: v2
|
|
tiers:
|
|
- name: small
|
|
minScore: 0
|
|
models: [openai/gpt-test]
|
|
- name: large
|
|
minScore: 400
|
|
models: [openai/gpt-test-large]
|
|
decision:
|
|
provider: decider
|
|
mode: shadow
|