Repository navigation
Description
Current status, September 22
Implementation is open in #448. The remaining review finding is that cancelling a compressed response leaves the upstream HTTP connection open; fix and test that before merge. This provider is required by in-app inference features such as #216, while external MCP agent identity and sessions in #215 and #404 do not require an Orbit-configured model.
Original requirements
Every AI feature Orbit has discussed (#215, #216, #217) assumes an admin can point the workspace at an inference provider. Nothing does that today: there is no provider setting, no key, no endpoint, and no outbound call to any model anywhere in the repository. That is correct as a default, and it is also why none of those issues can start.
This issue is the prerequisite. It carries the rules that used to live in the AI epic (#214), because they apply to every consumer:
- Off by default. With nothing configured the affordances are absent, not broken, the same way integrations already behave.
- Bring your own key and your own endpoint. OpenAI-compatible chat completions as the first shape, so a local endpoint works. Anthropic native as the second.
- Nothing leaves without consent. The settings page says plainly what is sent (issue titles, descriptions, comments) and where. Sending is a workspace decision an admin makes explicitly.
- The output is a suggestion. Nothing a model produces is applied without a person accepting it.
What to build
- A provider row per workspace: kind, base URL, model, an encrypted key.
integrationmay fit if the provider is treated as one more integration; say which in the design comment. - A client in
packages/services/src/ai/with onecomplete(prompt, options)entry point, a bounded timeout, and no retries by default. - A settings surface under
apps/web/src/app/(app)/settings/limited to admins throughpackages/shared/src/policy, with a "test connection" action. - Usage counting per workspace (calls, tokens where the provider reports them), shown on the same page, because a feature with an invoice attached needs to be visible.
- A capability check the rest of the app reads:
aiEnabled(principal)false means no AI affordance renders anywhere.
Not in scope
Any feature that uses the provider. Those are #216 (triage suggestions) and the summary work that will reopen when this lands.
Tests
Provider off means no affordance and no outbound request. Provider on with a failing endpoint degrades to the same state with a visible error for admins only. The key never appears in a log line, an error payload, or a realtime event.
Activity
Pallavikumarimdb commentedon Sep 6, 2026
@imshashank I’m taking this one. I’ll post updates here
imshashank commentedon Sep 7, 2026
@Pallavikumarimdb thanks, it is yours. It is labelled needs design on purpose, so before code please post a short comment here with three things: the storage shape (a row on integration versus its own table, and how the key is encrypted at rest), the client boundary in packages/services/src/ai/ with its one entry point and timeout, and how aiEnabled(principal) is exposed so every consumer reads one check. Once that is agreed the implementation is straightforward. You also have #394 and #428 in flight, so take them in whatever order suits you; none of the three blocks another.
Pallavikumarimdb commentedon Sep 7, 2026
@imshashank Thanks! I’ll take them in the order that makes the most sense.
Design proposal
I’ve looked at the existing patterns and my proposed approach is:
Storage & Encryption
integrationmodel (provider: 'ai',externalId: 'default') for the workspace AI provider rather than introducing a separate table.BETTER_AUTH_SECRETand per-tenant authenticated data.AI client boundary
packages/services/src/ai/with a single entry point:completePrompt(options).Capability check
aiEnabled(principal)capability check frompackages/services/src/ai/capability.ts.falseby default when no valid AI provider is configured/enabled, so consumers can consistently check AI availability.If this direction looks good, I’ll proceed with the PR for review.
github-actions commentedon Nov 22, 2026
This issue has had no activity for 60 days, so it is being marked stale.
If it still matters, say so and it stays open. Adding what you have
learned since filing it helps more than a bump on its own. Otherwise it
will close in 14 days, and closing is not a judgement, it just keeps the
list honest about what is actually being worked on. Reopening is always
fine.