Skip to content

CloudAgent - Support CLI-configured models in remote sessions#4325

Open
eshurakov wants to merge 4 commits into
mainfrom
heather-chevre
Open

CloudAgent - Support CLI-configured models in remote sessions#4325
eshurakov wants to merge 4 commits into
mainfrom
heather-chevre

Conversation

@eshurakov

Copy link
Copy Markdown
Contributor

Summary

Support CLI-configured models when chatting with live remote CLI sessions from Cloud Agent web and mobile. Previously the model picker was limited to Kilo Gateway models. This change introduces a session-scoped, owner-fenced list_models protocol v1, validates and normalizes the SDK ProviderListResponse into a provider-aware catalog, and wires it into the web and mobile model pickers while preserving the Gateway fallback for older CLIs.

Verification

  • Manually verified the web Cloud Chat model picker lists provider-grouped CLI models for a live remote session.
  • Manually verified selecting a CLI model sends the structured { providerID, modelID } payload.
  • Manually verified an older CLI still falls back to the Kilo Gateway model list.

Visual Changes

N/A

Reviewer Notes

  • Scope is live remote CLI sessions only; cloud-hosted Cloud Agent sessions remain Kilo Gateway-only.
  • UserConnectionDO now fences catalog requests by session owner, limits pending commands, and rejects oversized catalog payloads.
  • Observed model, catalog default, and explicit override are kept separate; only explicit override provenance affects sends.

@kilo-code-bot

kilo-code-bot Bot commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (1 file)
  • apps/web/src/lib/cloud-agent-sdk/session.test.ts
Previous Review Summaries (2 snapshots, latest commit 22a1c88)

Current summary above is authoritative. Previous snapshots are kept for context only.

Previous review (commit 22a1c88)

Status: No Issues Found | Recommendation: Merge

Files Reviewed (2 files)
  • apps/web/src/components/shared/ModelCombobox.tsx
  • apps/web/src/components/shared/model-combobox-options.ts

Previous review (commit f15c863)

Status: No Issues Found | Recommendation: Merge

Files Reviewed (51 files)
  • apps/mobile/src/app/(app)/agent-chat/model-picker.tsx
  • apps/mobile/src/components/agents/mobile-session-manager.test.ts
  • apps/mobile/src/components/agents/mobile-session-manager.ts
  • apps/mobile/src/components/agents/model-picker-content.tsx
  • apps/mobile/src/components/agents/model-selector.tsx
  • apps/mobile/src/components/agents/session-detail-content.tsx
  • apps/mobile/src/components/agents/use-session-config-sync.test.ts
  • apps/mobile/src/components/agents/use-session-config-sync.ts
  • apps/mobile/src/lib/hooks/use-session-model-options.ts
  • apps/mobile/src/lib/model-picker-rows.test.ts
  • apps/mobile/src/lib/model-picker-rows.ts
  • apps/mobile/src/lib/picker-bridge.test.ts
  • apps/mobile/src/lib/picker-bridge.ts
  • apps/mobile/src/lib/use-session-model-options.test.ts
  • apps/web/src/components/cloud-agent-next/CloudAgentProvider.tsx
  • apps/web/src/components/cloud-agent-next/CloudChatPage.tsx
  • apps/web/src/components/cloud-agent-next/FeedbackDialog.test.ts
  • apps/web/src/components/cloud-agent-next/FeedbackDialog.tsx
  • apps/web/src/components/cloud-agent-next/hooks/useOrganizationModels.ts
  • apps/web/src/components/cloud-agent-next/hooks/useSessionModels.test.ts
  • apps/web/src/components/cloud-agent-next/hooks/useSessionModels.ts
  • apps/web/src/components/cloud-agent-next/model-context-lengths.test.ts
  • apps/web/src/components/cloud-agent-next/model-context-lengths.ts
  • apps/web/src/components/shared/ModelCombobox.tsx
  • apps/web/src/components/shared/model-combobox-options.test.ts
  • apps/web/src/components/shared/model-combobox-options.ts
  • apps/web/src/lib/cloud-agent-sdk/cli-live-transport.test.ts
  • apps/web/src/lib/cloud-agent-sdk/cli-live-transport.ts
  • apps/web/src/lib/cloud-agent-sdk/cloud-agent-transport.test.ts
  • apps/web/src/lib/cloud-agent-sdk/cloud-agent-transport.ts
  • apps/web/src/lib/cloud-agent-sdk/index.ts
  • apps/web/src/lib/cloud-agent-sdk/normalizer.test.ts
  • apps/web/src/lib/cloud-agent-sdk/normalizer.ts
  • apps/web/src/lib/cloud-agent-sdk/remote-model-catalog.test.ts
  • apps/web/src/lib/cloud-agent-sdk/remote-model-catalog.ts
  • apps/web/src/lib/cloud-agent-sdk/schemas.ts
  • apps/web/src/lib/cloud-agent-sdk/session-manager.test.ts
  • apps/web/src/lib/cloud-agent-sdk/session-manager.ts
  • apps/web/src/lib/cloud-agent-sdk/session-transport.test.ts
  • apps/web/src/lib/cloud-agent-sdk/session.test.ts
  • apps/web/src/lib/cloud-agent-sdk/session.ts
  • apps/web/src/lib/cloud-agent-sdk/transport.ts
  • apps/web/src/lib/cloud-agent-sdk/types.ts
  • apps/web/src/lib/cloud-agent-sdk/user-web-connection.test.ts
  • apps/web/src/lib/cloud-agent-sdk/user-web-connection.ts
  • apps/web/src/lib/session-ingest-client.test.ts
  • apps/web/src/lib/session-ingest-client.ts
  • apps/web/src/routers/cli-sessions-v2-router.test.ts
  • apps/web/src/routers/cli-sessions-v2-router.ts
  • services/session-ingest/src/dos/UserConnectionDO.test.ts
  • services/session-ingest/src/dos/UserConnectionDO.ts

Reviewed by gpt-5.4-20260305 · Input: 70.1K · Output: 5.9K · Cached: 525.8K

Review guidance: REVIEW.md from base branch main

Sort remote model catalog providers/models by recommendation rank and
surface isFree/mayTrainOnYourPrompts/hasUserByokAvailable flags through
the wire schema so the model picker can render TUI-parity ordering and
footers. Add onReplayComplete to the transport/session layer so
consumers can tell a replayed message.updated from a live one.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant