feature: opt-in plugin config to reuse the proxied agent's LLM credentials
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 8/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Cần làm rõ
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- devtools, go
- Lĩnh vực
- ai-infra-agents, api, authentication, backend, security
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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).
- Ngôn ngữ chính
- Go
- Star
- 31
- Fork
- 49
- Merge trung bình
- 9 giờ 43 phút
- Pull request đã merge (30 ngày)
- 367
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của rossoctl/cortex
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
contextguru plugin: set keepalive.Record.Identity; context-guru v0.7.11 removes Record.AgentĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug laptop
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 55/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của rossoctl/cortex
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày
-
taskmanager: a failed v1alpha1 backup leaves the partial backup behindCó thể đã có người làm @arshil42 đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Packaging: support mise-en-placeĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 80/100
ether/etherpad-go#571 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
labeler: read a limit above math.MaxInt as math.MaxInt in nonNegative (CodeQL alerts #20 and #21)Đang mởcost:approved factory:queued factory:tracking priority:p2 rank:12 ready-for-doing task:approved tokens:50k
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
sisaku-security/sisakulint#860 · 2 bình luận ·