feature: opt-in plugin config to reuse the proxied agent's LLM credentials
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 8/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Da chiarire
- Stato di attività
- Attiva
- Stack tecnologico
- devtools, go
- Ambito
- ai-infra-agents, api, authentication, backend, security
Direzione di ricerca
The payload points at core/plugins/contextguru/plugin.go (incomingModel) as the closest existing in-process version of reusing the agent's credentials. The open questions are design decisions: out-of-process key handling, OAuth token policy, dialects and cost caps. Nothing here is settled, so a newcomer should not start coding; the first step is to comment and ask a maintainer to agree on the design. Done would be a maintainer-approved design, not a patch.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Summary
Add an opt-in plugin config option that lets a plugin reuse the LLM credentials of the agent Cortex is proxying (endpoint, model, API key), so users don't have to enter separate credentials for plugins that make their own LLM calls. Explicit credentials in the plugin config stay supported and take precedence.
Requested by @vinodmut for the altk-evolve integration; agreed by @huang195 in Slack.
Motivation
Plugins backed by a companion service that makes its own LLM calls (e.g. altk-evolve) currently need their own credentials: an API key, a base URL, and a model, set through env vars, a .env file, or plugin parameters. That's extra setup when the user usually wants the same model the agent already uses.
Today, consent is given by the user explicitly passing credentials as a plugin parameter (e.g. ibac's inference server). Reusing the agent's credentials silently would let a plugin run up token costs without the user knowing, so this must stay opt-in. A config flag keeps the consent explicit and removes the copy-paste.
Proposal
- A per-plugin config option, e.g.
llm.credentials: passthrough(the name is a placeholder), that is off by default. - When enabled, the plugin gets the agent's endpoint, model, and
Authorizationfrom the live request. - Explicit
api_key/base_url/modelin the plugin config still work, and override passthrough when set. - Calls made with reused credentials should carry the existing per-process sentinel header so the pipeline doesn't intercept them again. They should also be attributable (stats/telemetry) so the user can see the token spend a plugin drives.
Prior art
context-guru already does an in-process version of this: model.source: incoming rebuilds the agent's model client from the live request (base URL + token-exchanged Authorization + the request's model). See incomingModel in core/plugins/contextguru/plugin.go. It only supports the OpenAI dialect for now.
Open questions
- Out-of-process consumers. Evolve's learning step runs later ("once idle") in a separate process, after the request that carried the key has ended. Passthrough there means handing the key to another process, or holding it past the request, which in-process plugins don't do today. Options: Cortex hands the key over at registration time, or Cortex exposes a local relay endpoint the service calls and Cortex injects the agent's credentials there. The relay keeps the key inside Cortex and gives one place to meter spend.
- Subscription / OAuth tokens. When the agent runs on a Claude subscription, the "key" is an OAuth token, and using it for another service's calls may not be allowed under the provider's terms. Passthrough may need to be refused, or carry a warning, for OAuth-style credentials.
- Dialects. Anthropic as well as OpenAI (context-guru's
incomingis OpenAI-only). - Cost guardrails. Possibly an optional per-plugin token/spend cap when passthrough is enabled.
Related
Separate but adjacent: plugins backed by a long-running service (sparc, aiac, sentry, context-guru, Evolve) each need that service started outside Cortex. Hai noted that this pattern keeps coming up and may be worth revisiting, perhaps via a companion-process hook on the laptop supervisor (cortex --supervise).
- Lingua principale
- Go
- Stelle
- 31
- Fork
- 49
- Merge medio
- 9h 43m
- PR unite (30g)
- 367
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di rossoctl/cortex
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 1 giorno
-
bug laptop
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 55/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di rossoctl/cortex
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
-
taskmanager: a failed v1alpha1 backup leaves the partial backup behindForse già presa @arshil42 l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 80/100
ether/etherpad-go#571 ·
I maintainer di solito rispondono entro 1 giorno
-
labeler: read a limit above math.MaxInt as math.MaxInt in nonNegative (CodeQL alerts #20 and #21)Apertacost:approved factory:queued factory:tracking priority:p2 rank:12 ready-for-doing task:approved tokens:50k
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
sisaku-security/sisakulint#860 · 2 commenti ·