Summary
Gap analysis (code-verified) of whether the AINative managed chat-completion API is integrated into the IDE. Verdict: PARTIALLY INTEGRATED (~60-70%). All infrastructure exists but is disconnected at 3 specific glue points, so no IDE user can actually use AINative-billed inference today — even though the provider, auth service, SSE streaming, and usage tracking are all implemented.
This matters for product/billing: the IDE plan tier is a separate, unlaunched product line (family=ide_cli, 0 active subscribers, placeholder Stripe price IDs, metered by completions/chat NOT the credit pool). It cannot be sold until (a) this integration is completed and (b) its Stripe pricing + metering pass their own audit. This issue tracks the integration gap; a separate audit is needed before the IDE plan goes on sale.
What EXISTS (built, verified)
- ✅
AINativeCloudProvider class — full impl: JWT auth, SSE streaming, 401 auto-refresh, reconnect. Real endpoint https://api.ainative.studio — src/vs/workbench/contrib/ainative/electron-main/llmMessage/providers/ainativeCloudProvider.ts:52-65
- ✅
AINativeCloudAuthService — JWT auth, encrypted token storage, 5-min-buffer refresh
- ✅
ManagedChatAPIService — types for credits_consumed/credits_remaining
- ✅
usageTrackingService — trackManagedUsage(), getCreditsStatus(), quota monitoring (wired into chatThreadService)
- ✅ SSE streaming implementation (10 test cases)
- ✅
ainativeCloud registered as a ProviderName with 4 models defined
What is MISSING (the 3 disconnects)
| # |
Gap |
File:Line |
Effect |
| 1 |
sendAINativeCloudChat is a stub returning a hard-coded error ("not yet available... TASK-006"), wired as the provider's sendChat |
sendLLMMessage.impl.ts:850-857, :951 |
Dispatcher never calls the real provider |
| 2 |
displayInfoOfProviderName() throws for ainativeCloud (no case) |
ainativeSettingsTypes.ts:113 |
Settings UI crashes → user can't select the provider |
| 3 |
subTextMdOfProviderName() throws for ainativeCloud (no case) |
ainativeSettingsTypes.ts:135 |
Same UI crash on help text |
Secondary: no SDK client method for the chat-completions call yet (only /v1/auth/*); model registry still uses mock data (not live /v1/models); usage tracking is wired but inert because the API never returns credit data.
⚠️ Endpoint correctness note (backend integration)
ainativeCloudProvider.ts:54 targets /v1/chat/completions. Our billed managed path is /api/v1/managed/chat/completions (ManagedChatService — the gated, credit-metered handler). Wiring this up must point at the managed endpoint so credit deduction + the single-credit-pool billing (cost×2, chat_credit_service) actually fire. The bare /chat/completions path is the legacy handler and would bypass metering.
Tasks to close the integration
Estimated effort
~2-3 weeks (1 backend + 1 frontend). Architecture is solid; this is glue + endpoint correctness + a launch-readiness billing audit.
Summary
Gap analysis (code-verified) of whether the AINative managed chat-completion API is integrated into the IDE. Verdict: PARTIALLY INTEGRATED (~60-70%). All infrastructure exists but is disconnected at 3 specific glue points, so no IDE user can actually use AINative-billed inference today — even though the provider, auth service, SSE streaming, and usage tracking are all implemented.
This matters for product/billing: the IDE plan tier is a separate, unlaunched product line (family=
ide_cli, 0 active subscribers, placeholder Stripe price IDs, metered by completions/chat NOT the credit pool). It cannot be sold until (a) this integration is completed and (b) its Stripe pricing + metering pass their own audit. This issue tracks the integration gap; a separate audit is needed before the IDE plan goes on sale.What EXISTS (built, verified)
AINativeCloudProviderclass — full impl: JWT auth, SSE streaming, 401 auto-refresh, reconnect. Real endpointhttps://api.ainative.studio—src/vs/workbench/contrib/ainative/electron-main/llmMessage/providers/ainativeCloudProvider.ts:52-65AINativeCloudAuthService— JWT auth, encrypted token storage, 5-min-buffer refreshManagedChatAPIService— types forcredits_consumed/credits_remainingusageTrackingService—trackManagedUsage(),getCreditsStatus(), quota monitoring (wired into chatThreadService)ainativeCloudregistered as a ProviderName with 4 models definedWhat is MISSING (the 3 disconnects)
sendAINativeCloudChatis a stub returning a hard-coded error ("not yet available... TASK-006"), wired as the provider'ssendChatsendLLMMessage.impl.ts:850-857,:951displayInfoOfProviderName()throws forainativeCloud(no case)ainativeSettingsTypes.ts:113subTextMdOfProviderName()throws forainativeCloud(no case)ainativeSettingsTypes.ts:135Secondary: no SDK client method for the chat-completions call yet (only
/v1/auth/*); model registry still uses mock data (not live/v1/models); usage tracking is wired but inert because the API never returns credit data.ainativeCloudProvider.ts:54targets/v1/chat/completions. Our billed managed path is/api/v1/managed/chat/completions(ManagedChatService — the gated, credit-metered handler). Wiring this up must point at the managed endpoint so credit deduction + the single-credit-pool billing (cost×2,chat_credit_service) actually fire. The bare/chat/completionspath is the legacy handler and would bypass metering.Tasks to close the integration
sendAINativeCloudChatto callAINativeCloudProvider.sendChatCompletion()(injectIAINativeCloudAuthService) —sendLLMMessage.impl.ts:850ainativeCloudcase todisplayInfoOfProviderName()—ainativeSettingsTypes.ts:113ainativeCloudcase tosubTextMdOfProviderName()—ainativeSettingsTypes.ts:135/api/v1/managed/chat/completions), not/v1/chat/completionssendChatCompletion()method/v1/modelscredits_consumed/credits_remainingsurface in the usage tracker end-to-endEstimated effort
~2-3 weeks (1 backend + 1 frontend). Architecture is solid; this is glue + endpoint correctness + a launch-readiness billing audit.