feat: add authenticated Devin CLI bridge for LLM inference - #1341
Open
udi741 wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
Features
Authenticated Devin CLI for model inference.
Model selection:
--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_CALLSprotocol.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
devinCLI is an external prerequisite.Testing
devin_bridgeis packaged correctly.python -m devin_bridge --helpworks 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.tomlto includedevin_bridge*in package discovery.README.mdto 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.