Add GET /api/providers to agent system prompt - #1077
Open
ferrislucas wants to merge 4 commits into
Open
Conversation
Include the providers endpoint in the session API prompt so agents know how to discover available models and their valid modelId values when creating workspaces and sessions. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Co-authored-by: z.ai <noreply@z.ai>
Two defects in the Circus Command output panes surfaced as flaky failures in circus-command-output-auto-tail.spec.ts. A scroll-to-bottom frame scheduled while tailing kept running even after the user scrolled away, yanking a paused pane back to the bottom. The frame callback now re-reads isTailing at frame time, so state observed after scheduling wins. Separately, the tail of a run could be lost permanently. The command-run output subscription owns ordering and de-duplication by persisted sequence number, but its catch-up reads are HTTP round-trips that can resolve after the completion event - and the store silently discarded any append for a non-running run. Those sequenced appends now opt in to applying after completion, bypassing the throttled buffer that is finalized at completion time. The subscription also queues a follow-up read for chunks rejected while a read was already in flight; single flight previously swallowed them with no second pass. The inline pane's E2E assertion now polls for the final line instead of reading once at completion, matching the status-modal test: completion and the last output chunks are separate messages, so the tail can legitimately render just after the run is marked complete. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
ferrislucas
marked this pull request as ready for review
August 9, 2026 10:15
Co-authored-by: Codex <noreply@openai.com>
…into circus-chief/947a-what-are-models-are
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds the
GET /api/providersendpoint to the agent's system prompt documentation so agents can discover available models and their validmodelIdvalues when creating workspaces and sessions.Changes
packages/server/src/services/sessionApiPrompts.js— Added a "List Providers & Available Models" section with acurlexample and description of the response shape (kind,models[].modelId,displayName,tier,enabled,lifecycle).docs/agent-system-prompt.md— Added the corresponding row to the API reference table.Motivation
Agents currently have no documented way to discover which model values are accepted by the workspace/session creation endpoints. This PR surfaces the providers endpoint so agents can programmatically look up valid model IDs instead of guessing.