Skip to content

Add OpenRouter as default LLM provider; make deprecated Gemini SDK optional#31

Merged
Cuuper22 merged 1 commit into
mainfrom
claude/batch-openrouter
Jun 10, 2026
Merged

Add OpenRouter as default LLM provider; make deprecated Gemini SDK optional#31
Cuuper22 merged 1 commit into
mainfrom
claude/batch-openrouter

Conversation

@Cuuper22

Copy link
Copy Markdown
Owner

What

Adds OpenRouter as the recommended/default provider (per owner direction: "just use openrouter") and untangles the deprecated Gemini SDK.

  • New OpenRouterProvider (stdlib urllib, OpenAI-compatible chat completions) with transient-error retry/backoff, usage-based cost tracking, and OpenRouterAPIError, mirroring the existing provider patterns.
  • Factory auto-detect priority puts OPENROUTER_API_KEY first; src/config.py accepts and env-maps the provider everywhere.
  • erdos_config.json default fixed: was an invalid chatgpt / gpt-5.4 combination, now openrouter / google/gemini-2.5-flash.
  • google-generativeai (officially deprecated by Google) demoted from core dependency to the optional [gemini] extra; imports guarded so src.llm imports cleanly without it and Gemini tests skip rather than fail.
  • 19 new tests in tests/test_openrouter.py.

Verification

  • With the SDK installed: 333 passed, 9 skipped. Without it: 320 passed, 22 skipped. Both worlds green.
  • ERDOS_MOCK_MODE=1 python -m src.solver --manifest manifest.json still degrades gracefully.
  • Factory auto-detection verified: OPENROUTER_API_KEYOpenRouterProvider(model=google/gemini-2.5-flash).

Part of the project-wide polish batch.

https://claude.ai/code/session_01KAKnLjpFZ9oF74GNW9QNtN


Generated by Claude Code

- New OpenRouterProvider (stdlib urllib, OpenAI-compatible chat
  completions via openrouter.ai) with retry/backoff, usage-based cost
  tracking, and OpenRouterAPIError, mirroring existing providers.
- Factory: openrouter first in auto-detect priority (OPENROUTER_API_KEY);
  config.py accepts and env-maps the new provider.
- erdos_config.json default: openrouter + google/gemini-2.5-flash
  (was invalid chatgpt/gpt-5.4 combination).
- google-generativeai demoted from core dependency to optional
  [gemini] extra; imports guarded so src.llm imports cleanly without
  it and Gemini tests skip instead of failing.
- 19 new tests (tests/test_openrouter.py); suite green both with the
  SDK (333 passed, 9 skipped) and without (320 passed, 22 skipped).

https://claude.ai/code/session_01KAKnLjpFZ9oF74GNW9QNtN
@Cuuper22 Cuuper22 merged commit 9db654e into main Jun 10, 2026
0 of 5 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.

2 participants