feat: support custom Gemini-compatible base URL#96
Open
ObesityChow wants to merge 1 commit intoringhyacinth:masterfrom
Open
feat: support custom Gemini-compatible base URL#96ObesityChow wants to merge 1 commit intoringhyacinth:masterfrom
ObesityChow wants to merge 1 commit intoringhyacinth:masterfrom
Conversation
Allows users to point the image-generation pipeline at any Gemini-compatible API gateway or proxy (e.g. a self-hosted nano-banana endpoint) via the GEMINI_BASE_URL environment variable or runtime-config.json field. Changes: - backend/store_utils.py: load/persist gemini_base_url from env + JSON - backend/app.py: pass base_url env var to generation subprocess; expose it in GET /config/gemini; accept it in POST /config/gemini - scripts/gemini_image_generate.py: initialise genai.Client with http_options=types.HttpOptions(base_url=…) when GEMINI_BASE_URL is set - runtime-config.sample.json: add gemini_base_url sample key - .env.example: add GEMINI_BASE_URL comment entry - frontend/index.html + electron-standalone.html: add base-URL input field in the API settings panel; wire it through save/load paths; display current endpoint in status line (CN/EN/JA translations added) - README.md / README.en.md: document the new env var and config option
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Add support for a custom Gemini-compatible base URL.
Why
Right now Star Office UI assumes the default Gemini endpoint.
This makes it possible to use a Gemini-compatible proxy / gateway / custom nano-banana endpoint instead.
Included
GEMINI_BASE_URLsupport in config/envgoogle-genaiclient uses custombase_urlwhen setNotes
GEMINI_BASE_URLis empty