Skip to content

feat(assistant): support OpenRouter alongside Gemini via environment config - #102

Merged
hugoalves-dev merged 1 commit into
mainfrom
feat/assistant-openrouter-provider
Nov 6, 2026
Merged

hugoalves-dev merged 1 commit into
mainfrom
feat/assistant-openrouter-provider

Conversation

@hugoalves-dev

Copy link
Copy Markdown
Owner

Summary

  • Add Spring AI's official OpenAI-compatible chat starter to connect Ask ApplyWell to OpenRouter.
  • Keep Gemini/Google AI Studio support, selecting the chat backend with APP_ASSISTANT_PROVIDER (google-genai, openai for OpenRouter, or none).
  • Configure OPENROUTER_API_KEY, OPENROUTER_BASE_URL, and OPENROUTER_CHAT_MODEL, disable unused embedding auto-configuration.
  • Map OpenRouter HTTP 429 errors to the existing SSE RATE_LIMITED payload; document both setups and add configuration/error-mapper tests.

Configuration

APP_ASSISTANT_ENABLED=true
APP_ASSISTANT_PROVIDER=openai
OPENROUTER_API_KEY=...
OPENROUTER_BASE_URL=https://openrouter.ai/api/v1
OPENROUTER_CHAT_MODEL=openai/gpt-4o-mini

For Gemini, set APP_ASSISTANT_PROVIDER=google-genai and the existing GEMINI_* variables. The openai provider ID is the name of Spring AI's adapter; calls are directed to OpenRouter, not the OpenAI API.

Verification

  • Added OpenRouterAssistantConfigurationIT for model wiring and endpoint/model config.
  • Extended AssistantProviderErrorMapperTest for OpenRouter rate limiting.
  • Existing Gemini configuration test is retained.
  • Maven is unavailable in this execution environment; GitHub Actions mvn -B -ntp clean verify will run on this PR.

Notes

  • Existing SSE, read-only tools, and conversation memory are unchanged.
  • No credentials included.
  • No automatic cross-provider fallback; provider choice is made at startup.

@github-actions github-actions Bot added documentation Improvements or additions to documentation backend tests configuration labels Nov 6, 2026
@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown

Qodana for JVM

It seems all right 👌

No new problems were found according to the checks applied

View the detailed Qodana report

To be able to view the detailed Qodana report, you can either:

To get *.log files or any other Qodana artifacts, run the action with upload-result option set to true,
so that the action will upload the files as the job artifacts:

      - name: 'Qodana Scan'
        uses: JetBrains/qodana-action@v2025.3.2
        with:
          upload-result: true
Contact Qodana team

Contact us at qodana-support@jetbrains.com

@hugoalves-dev
hugoalves-dev merged commit e3ec170 into main Nov 6, 2026
6 checks passed
@hugoalves-dev
hugoalves-dev deleted the feat/assistant-openrouter-provider branch November 6, 2026 04:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend configuration documentation Improvements or additions to documentation tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant