Multi-tenant LLM gateway: upstream providers, per-user credits, billing, usage logs and OpenAI-compatible API #86
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
nsaspy/llm-log#86
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Goal
Evolve llm-log from transparent capture into the shared multi-tenant LLM control plane while preserving its lossless logging/Prolog analytics role.
Hosted Zara and other StarIntel clients should implement providers once against llm-log and receive a stable OpenAI-compatible downstream API.
Service identity
Private StarIntel clients use the internal service identity (for example
llm-log.star.intel; infra chooses final DNS).Public API may be exposed behind
llm.starintel.actorwith explicit auth/policy.Multi-tenancy
Every request resolves:
No analytics, raw prompt/completion, API key, balance or usage endpoint may leak across tenants.
Upstream provider ownership
Add server-side provider credential support:
llm.star.intelcan be one upstream among manyAPI
Provide a stable OpenAI-compatible surface at minimum:
/v1/modelsKeep provider-native adapters where OpenAI compatibility would lose required semantics.
Billing/credits
Integrate through a narrow billing authority contract (StarIntel biz):
upstream_cost,customer_cost,pricing_rule_versionllm-log must not silently invent provider costs. Unknown cost remains unknown until a configured pricing rule/provider report supplies it.
Logging
Preserve llm-log's core purpose:
Add configurable privacy/retention tiers because a paid service cannot assume every customer's raw prompt should live forever.
Quotas / abuse
User dashboard API
Tenant-scoped:
Acceptance
Routing/failover children
#95 Upstream exhaustion failover: route depleted sub-provider proxies through OpenRouter
#96 Subscription proxy adapters + worker correlation: record ChatGPT Pro/Codex and GLM Coding Plan token I/O