Commit Graph

2 Commits

Author SHA1 Message Date
Jiaxu Liu d6ef3c5d4d fix: raise explicit error when gh token is missing in CopilotClient
Replace the 'copilot' fallback string with a RuntimeError so users get
a clear message instead of a cryptic auth failure from the API.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-23 14:46:25 +00:00
Jiaxu Liu 888fdfbfb9 refactor: move Copilot logic into standalone copilot_client.py
- Add tradingagents/llm_clients/copilot_client.py with all Copilot auth
  (gh CLI token, GraphQL URL resolution, required headers) and CopilotClient
  class inline — no separate auth module needed
- Simplify openai_client.py: remove Copilot code, inline codex OAuth token
  logic directly (was tradingagents/auth/codex_token.py)
- Remove tradingagents/auth/ folder entirely
- Update factory.py to route 'copilot' -> CopilotClient
- Simplify cli/utils.py to delegate to copilot_client helpers

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-23 13:59:09 +00:00