Skip to content

JBAI-13681 Implement OpenRouter clients and prompt executor #15

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 8, 2025

Conversation

e5l
Copy link
Member

@e5l e5l commented May 8, 2025

Fix part of JBAI-13681 Implement Gemini, LightLLM, OpenRouter clients and prompt executors.

@e5l e5l requested review from sproshev, Ololoshechkin and Copilot May 8, 2025 08:04
@e5l e5l self-assigned this May 8, 2025
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR implements support for OpenRouter clients and adds a prompt executor for the new provider.

  • Added a new include in settings.gradle.kts for the OpenRouter client.
  • Introduced the OpenRouter provider in LLMProvider.kt and updated LLMCapability.kt with a Vision capability.
  • Added tests and client implementations for OpenRouter in JVM, JS, and common modules.

Reviewed Changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated no comments.

Show a summary per file
File Description
settings.gradle.kts Added module include for the OpenRouter client.
LLMProvider.kt Added OpenRouter provider entry.
LLMCapability.kt Added a Vision capability entry.
SimplePromptExecutors.kt Provided a new executor for OpenRouter.
build.gradle.kts (prompt-executor-llms-all) Added dependency for the OpenRouter client.
OpenRouterDirectClientTest.kt Added integration tests for OpenRouter client functionality.
JvmEngineProvider.kt & OpenRouterDirectLLMClient.js.kt Provided platform-specific engine support for OpenRouter client.
OpenRouterModels.kt Defined various OpenRouter-based LLM models.
build.gradle.kts (openrouter-client) Configured multiplatform dependencies and publishing for the new client.
CLAUDE.md Added documentation specific to working with code in this repository.
Comments suppressed due to low confidence (1)

prompt/prompt-executor/prompt-executor-clients/prompt-executor-openrouter-client/src/commonMain/kotlin/ai/jetbrains/code/prompt/executor/clients/openrouter/OpenRouterModels.kt:57

  • [nitpick] The model identifier 'GPT4o' may be ambiguous; consider renaming it to a more descriptive name (e.g., 'GPT4Alternate') to improve clarity.
val GPT4o = LLModel(

@e5l
Copy link
Member Author

e5l commented May 8, 2025

Using the free model for tests. Please consider adding an OpenRouter token on CI

@e5l e5l merged commit 70b4265 into main May 8, 2025
1 of 3 checks passed
@e5l e5l deleted the e5l/open-router branch May 8, 2025 12:40
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