refactor: remove retired agent provider integration
This commit is contained in:
+13
-12
@@ -37,14 +37,13 @@ Chat upload limits:
|
||||
"openai": { "models": ["chat-latest", "gpt-4.1-mini"], "loadedAt": "2026-02-14T00:00:00.000Z", "error": null },
|
||||
"anthropic": { "models": ["claude-3-5-sonnet-latest"], "loadedAt": null, "error": null },
|
||||
"xai": { "models": ["grok-3-mini"], "loadedAt": null, "error": null },
|
||||
"gemini": { "models": ["gemini-3.5-flash"], "loadedAt": null, "error": null },
|
||||
"hermes-agent": { "models": ["hermes-agent"], "loadedAt": null, "error": null }
|
||||
"gemini": { "models": ["gemini-3.5-flash"], "loadedAt": null, "error": null }
|
||||
}
|
||||
}
|
||||
```
|
||||
- Selectable providers are `openai`, `anthropic`, `xai`, and `gemini`. Unsupported provider IDs are rejected with HTTP 400 by chat creation, chat completion, and Quick Question endpoints. Sybil Agent runs through its dedicated room or an inline `@sybil` mention; it is not a model-catalog provider.
|
||||
- OpenAI model lists are filtered to models that are expected to work with the backend's Responses API implementation, including the exact `chat-latest` alias when returned by OpenAI. Audio, image-generation, embedding, moderation, and other specialized model ids remain excluded. See [OpenAI's Chat Latest documentation](https://developers.openai.com/api/docs/models/chat-latest) for supported capabilities.
|
||||
- Gemini model lists are loaded from Google's native Models API and filtered to Gemini `generateContent` model ids.
|
||||
- `hermes-agent` is included only when `HERMES_AGENT_API_KEY` is configured. Set it to Hermes `API_SERVER_KEY`, or any non-empty value if that local server does not require auth. `HERMES_AGENT_API_BASE_URL` defaults to `http://127.0.0.1:8642/v1`; set `HERMES_AGENT_MODEL` only when you need an additional fallback/override model id.
|
||||
- The backend loads provider model lists at startup and refreshes them about once every 24 hours. If a later provider refresh fails, the response keeps the last loaded model list for that provider and sets `error` to the latest failure message.
|
||||
|
||||
## Chat Tools
|
||||
@@ -148,7 +147,7 @@ History search (`q`) notes:
|
||||
```json
|
||||
{
|
||||
"title": "optional title",
|
||||
"provider": "optional openai|anthropic|xai|gemini|hermes-agent",
|
||||
"provider": "optional openai|anthropic|xai|gemini",
|
||||
"model": "optional model id",
|
||||
"additionalSystemPrompt": "optional stored system prompt",
|
||||
"enabledTools": ["web_search", "fetch_url"],
|
||||
@@ -286,7 +285,7 @@ Notes:
|
||||
{
|
||||
"chatId": "optional-chat-id",
|
||||
"clientRequestId": "optional-client-generated-id",
|
||||
"provider": "openai|anthropic|xai|gemini|hermes-agent",
|
||||
"provider": "openai|anthropic|xai|gemini",
|
||||
"model": "string",
|
||||
"messages": [
|
||||
{
|
||||
@@ -337,7 +336,8 @@ Behavior notes:
|
||||
- If `chatId` is present, server validates chat existence.
|
||||
- `clientRequestId` is an optional stable identifier for retries of a persisted inline Agent completion.
|
||||
- For a persisted ordinary chat, a literal case-insensitive `@sybil` token in the latest user message invokes the existing persistent Sybil Agent instead of the selected provider for that turn. Email addresses, code spans/fences, indented code, and Markdown quote lines do not trigger it. The message and Agent reply remain visible in the chat; both are marked as Agent asides and are excluded by the backend from later selected-provider conversation history. The Agent root request is not projected into the visible Agent transcript.
|
||||
- The completion response identifies an inline Agent reply with `provider: "hermes-agent"`, `model: "sybil-agent"`, and `message.name: "Sybil Agent"`, `message.agentAside: true`.
|
||||
- The completion response identifies an inline Agent reply with `provider: "sybil-agent"`, `model: "sybil-agent"`, and `message.name: "Sybil Agent"`, `message.agentAside: true`.
|
||||
- The response provider identity can therefore differ from the request's selectable provider. Clients must accept `sybil-agent` in completion responses without adding it to provider selectors.
|
||||
- Agent asides are identified by backend-stored `metadata.agentAside`, not client-supplied metadata. The ordinary-chat list/history APIs above support Agent tools reading the complete visible thread, including prior asides and attachment data, with cursor pagination.
|
||||
- Before the Agent is invoked, the backend paginates and supplies the complete safe visible-thread projection as required initial context; the Agent does not have to choose `read_chat_history` for the current thread. User/assistant asides and full supported attachment representations are included, while system/tool rows and unrelated metadata are excluded. Historical content remains untrusted context, not new authority.
|
||||
- The initial context transfer is limited to 30 MiB. A stored text attachment marked truncated, incomplete history, or a transfer/provider context-limit failure returns an explicit error and no answer from partial history; providers may reject a complete thread that exceeds their model context window.
|
||||
@@ -355,10 +355,9 @@ Behavior notes:
|
||||
- For `anthropic`, backend calls Anthropic's Messages API and enables internal tool use with Anthropic `tool_use`/`tool_result` content blocks.
|
||||
- For `xai`, backend calls xAI's OpenAI-compatible Chat Completions API and enables internal tool use with the same internal system instruction.
|
||||
- For `gemini`, backend calls Google's native Gemini `generateContent` API and enables internal tool use with Gemini function calling.
|
||||
- For `hermes-agent`, backend calls the configured Hermes Agent OpenAI-compatible Chat Completions API without adding Sybil-managed tool definitions; Hermes Agent handles its own tools server-side.
|
||||
- For `openai`, image attachments are sent as Responses `input_image` items and text attachments are sent as `input_text` items.
|
||||
- For `gemini`, image attachments are sent as native Gemini `inlineData` parts and text attachments are sent as text parts.
|
||||
- For `xai` and `hermes-agent`, image attachments are sent as Chat Completions content parts alongside text.
|
||||
- For `xai`, image attachments are sent as Chat Completions content parts alongside text.
|
||||
- For `openai`, Responses calls that can enter the server-managed tool loop use `store: true` so reasoning and function-call items can be passed between tool rounds.
|
||||
- For `anthropic`, image attachments are sent as Messages API `image` blocks using base64 source data; text attachments are added as `text` blocks.
|
||||
- Available Sybil-managed tool calls for `openai`, `anthropic`, `xai`, and `gemini`: `web_search` and `fetch_url`. When `CHAT_CODEX_TOOL_ENABLED=true`, `codex_exec` is also available. When `CHAT_SHELL_TOOL_ENABLED=true`, `shell_exec` is also available.
|
||||
@@ -481,6 +480,8 @@ Behavior notes:
|
||||
|
||||
## Type Shapes
|
||||
|
||||
Saved selections for unsupported provider IDs are returned as `null` for both the provider and its paired model. Chat messages and historical call records are preserved; an unsupported `calls[].provider` is returned as `null`, while the original call request/response snapshots remain unchanged. Clients should choose a supported provider before continuing those chats.
|
||||
|
||||
`ChatSummary`
|
||||
```json
|
||||
{
|
||||
@@ -492,9 +493,9 @@ Behavior notes:
|
||||
"updatedAt": "...",
|
||||
"starred": false,
|
||||
"starredAt": null,
|
||||
"initiatedProvider": "openai|anthropic|xai|gemini|hermes-agent|null",
|
||||
"initiatedProvider": "openai|anthropic|xai|gemini|null",
|
||||
"initiatedModel": "string|null",
|
||||
"lastUsedProvider": "openai|anthropic|xai|gemini|hermes-agent|null",
|
||||
"lastUsedProvider": "openai|anthropic|xai|gemini|null",
|
||||
"lastUsedModel": "string|null",
|
||||
"additionalSystemPrompt": null,
|
||||
"enabledTools": ["web_search", "fetch_url"]
|
||||
@@ -546,9 +547,9 @@ Behavior notes:
|
||||
"updatedAt": "...",
|
||||
"starred": false,
|
||||
"starredAt": null,
|
||||
"initiatedProvider": "openai|anthropic|xai|gemini|hermes-agent|null",
|
||||
"initiatedProvider": "openai|anthropic|xai|gemini|null",
|
||||
"initiatedModel": "string|null",
|
||||
"lastUsedProvider": "openai|anthropic|xai|gemini|hermes-agent|null",
|
||||
"lastUsedProvider": "openai|anthropic|xai|gemini|null",
|
||||
"lastUsedModel": "string|null",
|
||||
"additionalSystemPrompt": null,
|
||||
"enabledTools": ["web_search", "fetch_url"],
|
||||
|
||||
Reference in New Issue
Block a user