feat: add Atomic Chat as local OpenAI-compatible provider - #414
Open
yanalialiuk wants to merge 1 commit into
Open
feat: add Atomic Chat as local OpenAI-compatible provider#414yanalialiuk wants to merge 1 commit into
yanalialiuk wants to merge 1 commit into
Conversation
Add atomic_chat provider for Atomic Chat's local API (default http://127.0.0.1:1337/v1), config examples, docs, and unit tests. Co-authored-by: Cursor <cursoragent@cursor.com>
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.
Description
Adds a first-class
atomic_chatLLM provider for Atomic Chat — a local desktop app that exposes an OpenAI-compatible HTTP API (defaulthttp://127.0.0.1:1337/v1).Users can run Trae Agent against locally loaded models without cloud API keys. The client uses the same Chat Completions flow as other OpenAI-compatible providers (e.g. OpenRouter, Doubao), not the Ollama-native SDK path.
More Information
Changes
trae_agent/utils/llm_clients/atomic_chat_client.pyAtomicChatClient+AtomicChatProviderwith defaults: base URLhttp://127.0.0.1:1337/v1, API keynooptrae_agent/utils/llm_clients/llm_client.pyLLMProvider.ATOMIC_CHAT(atomic_chat) in the provider switchtrae_config.json.example/trae_config.yaml.exampledocs/atomic_chat.mdREADME.md--provider atomic_chattests/utils/test_atomic_chat_client_utils.pySKIP_ATOMIC_CHAT_TESTDesign notes
/v1/chat/completions, soOpenAICompatibleClientis reused instead of adding a separate protocol stack.supports_tool_calling()uses name heuristics (qwen, llama, gemma, etc.); can be overridden viasupports_tool_calling: falsein YAML model config.ATOMIC_CHAT_API_KEYandATOMIC_CHAT_BASE_URLfollow the existingresolve_config_valuepattern ({PROVIDER}_API_KEY/{PROVIDER}_BASE_URL).Impact
atomic_chatValidation
Prerequisites
uv syncor equivalent).curl http://127.0.0.1:1337/v1/models # Note a model id from the response (e.g. gemma-4-E4B-it-IQ4_XS)Unit tests
Expected: default base URL/API key, LLMProvider.ATOMIC_CHAT wiring, tool-calling heuristic pass.
CLI
Config files
atomic_chatentries fromtrae_config.json.exampleandtrae_config.yaml.example.docs/atomic_chat.mdfor full YAML agent wiring.