You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: codex-rs/acp/docs.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -112,13 +112,13 @@ Agent callbacks are handled through a channel-based forwarding pattern:
112
112
**Model Registry and Lookup Architecture:**
113
113
114
114
The ACP registry in `@/codex-rs/acp/src/registry.rs` is **model-centric** rather than provider-centric:
115
-
-`get_agent_config()` accepts model names (e.g., "mock-model", "gemini-flash-2.0") instead of provider names
115
+
-`get_agent_config()` accepts model names (e.g., "mock-model", "gemini-flash-2.5") instead of provider names
116
116
- Called from `@/codex-rs/core/src/client.rs` with `self.config.model` when handling `WireApi::Acp`
117
117
- Returns `AcpAgentConfig` containing three fields:
118
118
-`provider`: Identifies which agent subprocess to spawn (e.g., "mock-acp", "gemini-acp")
119
119
-`command`: Executable path or command name
120
120
-`args`: Arguments to pass to the subprocess
121
-
- Model names are normalized to lowercase for case-insensitive matching (e.g., "Gemini-Flash-2.0" → "gemini-flash-2.0")
121
+
- Model names are normalized to lowercase for case-insensitive matching (e.g., "Gemini-Flash-2.5" → "gemini-flash-2.5")
122
122
- Uses exact matching only (no prefix matching) - each model must be explicitly registered
123
123
- The `provider` field enables future optimization to determine when existing subprocess can be reused vs when new one must be spawned when switching models
Response streaming uses `ResponseStream` of `ResponseEvent` items.
90
90
91
-
For ACP providers (`wire_api: WireApi::Acp`), the client looks up subprocess configuration via `codex_acp::get_agent_config(self.config.model)` from `@/codex-rs/acp/src/registry.rs`. The registry is **model-centric**: it maps model names (e.g., "mock-model", "gemini-flash-2.0") to `AcpAgentConfig` structs containing provider identifier, command, and args. This differs from the provider-based approach used for HTTP APIs. ACP providers should not define `env_key` or `env_key_instructions` in their `ModelProviderInfo` entries, as they communicate via subprocess rather than HTTP APIs.
91
+
For ACP providers (`wire_api: WireApi::Acp`), the client looks up subprocess configuration via `codex_acp::get_agent_config(self.config.model)` from `@/codex-rs/acp/src/registry.rs`. The registry is **model-centric**: it maps model names (e.g., "mock-model", "gemini-2.5-flash") to `AcpAgentConfig` structs containing provider identifier, command, and args. This differs from the provider-based approach used for HTTP APIs. ACP providers should not define `env_key` or `env_key_instructions` in their `ModelProviderInfo` entries, as they communicate via subprocess rather than HTTP APIs.
0 commit comments