Skip to content

feat(executor): add openai-compat tool type for HTTP API endpoints#392

Merged
RyderFreeman4Logos merged 1 commit intomainfrom
feat/openai-compat-tool
Mar 10, 2026
Merged

feat(executor): add openai-compat tool type for HTTP API endpoints#392
RyderFreeman4Logos merged 1 commit intomainfrom
feat/openai-compat-tool

Conversation

@RyderFreeman4Logos
Copy link
Owner

Summary

  • Add OpenaiCompat as the 5th tool type in CSA, enabling integration with OpenAI-compatible HTTP APIs (litellm, vllm, local proxy servers)
  • New TransportMode::OpenaiCompat — pure HTTP transport, no process management, no cgroup sandbox
  • Config resolution from env vars at execute time (OPENAI_COMPAT_BASE_URL, OPENAI_COMPAT_API_KEY, OPENAI_COMPAT_MODEL) via [tools.openai-compat.env] in global config

Design

  • Closed enum pattern: exhaustive match arms across all tool enums (compiler-enforced completeness)
  • ModelFamily::Other for the new tool (not Anthropic/Google/OpenAI-specific)
  • Config resolution order: extra_env → system env → executor model_override → error
  • HTTP-only: is_tool_binary_available() returns true unconditionally (no binary to check)
  • reqwest dependency already existed in workspace; added to csa-executor

Files changed (6 crates)

  • csa-core: ToolName::OpenaiCompat variant, ModelFamily::Other
  • csa-config: base_url/api_key fields on ToolConfig, all_known_tools, validation
  • csa-executor: Executor variant, TransportFactory, new transport_openai_compat.rs
  • cli-sub-agent: parse_tool_name, is_tool_binary_available

Test plan

  • All 174 csa-executor tests pass (including new transport tests)
  • All 46 csa-config validation tests pass
  • Full workspace: 789 tests pass
  • just pre-commit passes (fmt, clippy, deny, test, monolith check)
  • Manual: csa run --tool openai-compat "hello" with local proxy at localhost:8317

🤖 Generated with Claude Code

Add OpenaiCompat as the 5th tool type in CSA, enabling integration with
OpenAI-compatible HTTP APIs (litellm, vllm, local proxy servers).

Key design decisions:
- New TransportMode::OpenaiCompat (pure HTTP, no process management)
- Config resolution from env vars at execute time (OPENAI_COMPAT_BASE_URL,
  OPENAI_COMPAT_API_KEY, OPENAI_COMPAT_MODEL) via [tools.openai-compat.env]
- Model fallback: env var > executor model_override > error
- Exhaustive match arms across all tool enums (compiler-enforced)

Files changed across 6 crates:
- csa-core: ToolName::OpenaiCompat variant, ModelFamily::Other
- csa-config: base_url/api_key fields on ToolConfig, all_known_tools, validate
- csa-executor: Executor variant, transport factory, HTTP transport impl
- cli-sub-agent: parse_tool_name, is_tool_binary_available

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@chatgpt-codex-connector
Copy link

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@RyderFreeman4Logos RyderFreeman4Logos merged commit 9914b6d into main Mar 10, 2026
4 of 6 checks passed
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