Skip to content

Add GET /api/providers to agent system prompt - #1077

Open
ferrislucas wants to merge 4 commits into
mainfrom
circus-chief/947a-what-are-models-are
Open

Add GET /api/providers to agent system prompt#1077
ferrislucas wants to merge 4 commits into
mainfrom
circus-chief/947a-what-are-models-are

Conversation

@ferrislucas

Copy link
Copy Markdown
Owner

Summary

Adds the GET /api/providers endpoint to the agent's system prompt documentation so agents can discover available models and their valid modelId values when creating workspaces and sessions.

Changes

  • packages/server/src/services/sessionApiPrompts.js — Added a "List Providers & Available Models" section with a curl example 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.

ferrislucas and others added 2 commits August 6, 2026 22:30
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
ferrislucas marked this pull request as ready for review August 9, 2026 10:15
ferrislucas and others added 2 commits August 9, 2026 08:17
Co-authored-by: Codex <noreply@openai.com>
…into circus-chief/947a-what-are-models-are
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