feat(dotAI): Dot AI LangChain4J - OpenRouter#36136
Conversation
|
Claude finished @wezell's task in 1m 0s —— View job Rollback Safety Analysis
Result: ✅ Safe to RollbackThe changes in this PR have been analyzed against all rollback-unsafe categories: Changed files:
Category-by-category assessment:
This PR adds a pure application-layer feature: a new Label applied: AI: Safe To Rollback |
🤖 Bedrock Review —
|
🤖 Bedrock Review —
|
| .apiKey(config.apiKey()) | ||
| .modelName(config.model()) | ||
| .baseUrl(baseUrl(config)); | ||
| if (config.temperature() != null) builder.temperature(config.temperature()); |
There was a problem hiding this comment.
one single line if and no { } 🙄
🤖 dotBot Review (Bedrock)Reviewed 4 file(s); 4 candidate(s) → 3 confirmed, 0 uncertain (unverified, kept for review). Confirmed findings
us.deepseek.r1-v1:0 · Run: #28272291702 · tokens: in: 20640 · out: 6449 · total: 27089 · calls: 8 · est. ~$0.063 |
Summary
Adds OpenRouter as a supported provider. OpenRouter aggregates hundreds of models
(OpenAI, Anthropic, Meta, Mistral, DeepSeek, etc.) behind a single OpenAI-compatible
API and one API key — the strategy reuses the LangChain4J OpenAI model classes
pointed at the OpenRouter base URL.
OpenRouterModelProviderStrategyregistered inLangChain4jModelFactory.STRATEGIESlangchain4j-open-aiwith base URLhttps://openrouter.ai/api/v1endpointconfig field overrides the base URL (proxies/gateways)UnsupportedOperationException(OpenRouter has no such endpoints)LangChain4jModelFactoryTestConfiguration
{ "chat": { "provider": "openrouter", "model": "openai/gpt-4o", "apiKey": "sk-or-...", "maxTokens": 4096, "temperature": 0.7 } }Notes
openai/gpt-4o,anthropic/claude-sonnet-4,deepseek/deepseek-r1.maxRetriesis not supported by the streaming chat model and is ignored with a warning (same behavior as the OpenAI provider).Related Issue
This PR fixes #36133
EPIC: dotAI Multi-Provider Support #33970