feat(providers): add Gemini Agent Platform (Express) provider - #64
Conversation
Adds a new provider that speaks the Gemini wire format but targets aiplatform.googleapis.com with x-goog-api-key auth and a curated model whitelist (the Express endpoint can't list models). - Chat and image-generation adapters, delegating payload/response handling to the shared Gemini adapter - Support for Nano Banana image models, including non-streaming responses parsed as a single JSON body - Consolidates the scattered "is this a Gemini provider" checks behind shared predicates so all Gemini-family behavior stays in sync By apparao.parwatikar
|
Can we avoid hardcoding the Express model list here? If the Express API does not expose a list-models endpoint, I would rather treat this provider as "manual model ID entry" instead of returning a baked-in whitelist from A couple of other issues I noticed: First, The image-generation Express adapter normalizes Second, Provider API-key verification may not be Express-aware. I would suggest removing the hardcoded |
The aarch64-linux-android `cargo check` runs with `-D warnings`, and the `#[cfg(mobile)]` branch of `llamacpp_context_info` failed to discard the mmproj/MTP params added later, breaking the Android check. Bind them with `let _ =` like the existing params. By apparao.parwatikar
|
You didnt have to fix that. Its not something caused by your changes. Im still changing some stuff in llama.cpp. |
Curated model catalog for the Gemini Agent Platform (Express) provider, served as a remote-refreshable manifest since the Express endpoint has no API-key-listable models endpoint. By apparao.parwatikar
By apparao.parwatikar
- Image adapter now reuses chat's express_base() so /v1 and /v1beta bases upgrade to /v1beta1 the same way (no more .../v1/v1beta1/...). - Replace the stale hardcoded known_models() whitelist with a curated manifest, LiteLLM-style: bundled default + runtime fetch from a public raw URL (1h TTL cache, validate, fall back to cache then bundled). Model-id stays free-text, so the list is only a convenience. - Remove the now-dead known_models trait default and the unreachable list_models_endpoint/parse_models_list overrides. By apparao.parwatikar
|
@MegalithOfficial Fixed the two issues, for the model list I have added a json manifest in the repo, also the app live fetches it when it needs, it's like what litellm does for its 'model prices and context window' json file. |
|
I still prefer manual rather than having it hardcoded or via a JSON file. It creates extra responsibility that I am not willing to take. |
The curated/remote-refreshable model manifest added maintenance burden (keeping the model list current). Remove it entirely and let users enter the Express model id manually, since the Express endpoint has no API-key-listable models endpoint anyway. - Delete providers::express_models and the bundled manifest JSON. - get_remote_models returns an empty list for gemini-agent-platform-express (same as llamacpp); the model-id field stays free-text. - Update the adapter comment to match. By apparao.parwatikar
ModelSetup only enabled manual input when the fetched model list was non-empty, so providers that return an empty list (e.g. Gemini Express, which now has no listable catalog) left the onboarding screen stuck on an empty dropdown with no way to type a model id. Mirror ConfigForm: switch to manual input when the list is empty or the fetch throws. By apparao.parwatikar
|
@MegalithOfficial Sure. Removed the model manifest, Gemini Express is now, manual edit only. |
|
Ignore windows action failure, Its because of llama.cpp changing their frontend. |
…ution # Conflicts: # src/core/storage/schemas.ts
|
Please provide your discord name so i can give you contributors role on server. |
|
@MegalithOfficial It's spelled same as my github account: rppavan |
Adds a new provider that speaks the Gemini wire format but targets aiplatform.googleapis.com with x-goog-api-key auth and a curated model whitelist (the Express endpoint can't list models).