Skip to content

feat: add authenticated Devin CLI bridge for LLM inference - #1341

Open
udi741 wants to merge 1 commit into
TauricResearch:mainfrom
udi741:feat/devin-cli-bridge
Open

feat: add authenticated Devin CLI bridge for LLM inference#1341
udi741 wants to merge 1 commit into
TauricResearch:mainfrom
udi741:feat/devin-cli-bridge

Conversation

@udi741

@udi741 udi741 commented Sep 13, 2026

Copy link
Copy Markdown

Summary

Add a local OpenAI-compatible sidecar (devin_bridge) that routes TradingAgents LLM inference through an authenticated Devin CLI installation.

This lets users run TradingAgents without configuring a direct LLM-provider API key for model inference — the authenticated Devin CLI provides model access.

Architecture

TradingAgents remains responsible for graph orchestration, agents, prompts, schemas, and tool execution. The bridge is a separate sidecar that only translates model requests and responses.

No TradingAgents agents, financial tools, or graph logic are modified.

TradingAgents CLI
→ TradingAgents LangGraph
→ existing openai_compatible provider
→ local devin_bridge sidecar
→ authenticated devin CLI
→ selected Devin model

Features

  • Authenticated Devin CLI for model inference.

  • Model selection:

    • no model flag → Devin CLI configured/default model;
    • --model <id> → one explicit model for both aliases;
    • --quick-model <id> / --deep-model <id> → independent overrides.
  • Model discovery with python -m devin_bridge --list-models.

  • Single and multiple tool calls using a strict TOOL_CALLS protocol.

  • Structured outputs remain compatible with TradingAgents .with_structured_output(...).

  • Raw FINAL response transport for long Markdown/free-form model output.

  • Strict protocol validation for malformed or ambiguous responses.

  • Loopback-only server by default.

  • No new Python dependencies; the authenticated devin CLI is an external prerequisite.

Testing

  • 137 offline bridge tests pass.
  • 667 existing upstream tests pass unchanged, with one optional dependency skip.
  • Ruff passes on all touched Python files.
  • Built-wheel verification confirms devin_bridge is packaged correctly.
  • python -m devin_bridge --help works from an isolated wheel installation.

Scope

Core TradingAgents agents, LangGraph orchestration, financial tools, and schemas remain unchanged.

The only non-bridge files modified are:

  • pyproject.toml to include devin_bridge* in package discovery.
  • README.md to document Devin CLI support.

Validated model

GLM-5.2 High (glm-5-2) was validated end-to-end with the complete TradingAgents workflow.

Other Devin models may work but were not validated as part of this contribution.

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