amal66 brings Gemini under enterprise controls

This fork makes Google's Gemini models a more realistic option for tightly governed legal AI deployments.

integrationcompliance

amal66 has proposed an opt-in route through Vertex AI, Google's managed AI platform, while keeping the existing Gemini choice and default setup intact. Teams only use the new route when they deliberately configure it.

That matters because the route is built for organisations that need project-level billing and identity-based access rather than distributing API keys. It also supports the practical parts of an AI assistant conversation: live streamed answers, tool use, visible reasoning updates and cancellation. The work was tested, but the upstream pull request closed without merging, so interested teams should inspect the fork before relying on it.

So what Legal teams with strict cloud controls should care if Gemini is attractive but ordinary API-key access is a non-starter.

View this fork on GitHub →

Spotted something wrong? Or know the PR text has fresher detail than the writeup above?

Commits in this thread

1 commit from amal66/mike, oldest first. Source extracted verbatim from the harvested git log.

SHA Subject Author Date
57c1c1b5 feat(google-cloud): GCS storage adapter + Vertex AI Gemini provider (#2) Amalanand Muthukumaran 2026-05-24 ↗ GitHub
commit body
* feat(google-cloud): GCS storage adapter + Vertex AI Gemini provider

Adds two drop-in Google Cloud integrations following the existing
extension points (StorageAdapter + LLMProviderAdapter) so no core files
needed editing beyond exporting the new classes.

**GCS storage adapter** (lib/storage/gcs.ts)
- Implements the StorageAdapter interface backed by @google-cloud/storage
- Auth via Application Default Credentials - covers service account key
  files (GOOGLE_APPLICATION_CREDENTIALS), Workload Identity on GKE /
  Cloud Run, and gcloud CLI for local dev (zero secrets to manage)
- Enabled when GCS_PROJECT_ID or GOOGLE_APPLICATION_CREDENTIALS is set
- Signed URLs use V4 signing; Content-Disposition header supported
- Swap R2 for GCS with one setStorageAdapter() call at startup:
    import { setStorageAdapter } from "./lib/storage";
    import { GCSStorageAdapter } from "./lib/storage/gcs";
    setStorageAdapter(new GCSStorageAdapter());

**Vertex AI Gemini provider** (lib/llm/providers/vertexAI.ts)
- Routes all Gemini model IDs through Google Cloud Vertex AI instead of
  AI Studio - same model IDs, different billing + auth + data residency
- Uses @google/genai (already a dep) with vertexai: true mode - no new
  package required
- Auth via ADC: Workload Identity on GKE/Cloud Run, or
  GOOGLE_APPLICATION_CREDENTIALS locally
- Replaces the built-in gemini provider on re-registration (same id):
    import { setupVertexAI } from "lib/llm/providers/vertexAI";
    setupVertexAI();

**Tests**: 23 new tests (16 GCS adapter, 7 Vertex AI provider); full
suite 151 tests passing.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* docs(readme): rewrite as setup and contribution guide

The previous README was a project retrospective - design rationale,
open-source bets, a 40-row change index - with the actual setup steps
buried partway through. This rewrites it as a task-oriented doc:

- Quick Start: clone → install → env → database → run (5 steps)
- Configuration: all env vars grouped by category with descriptions
- Extending Mike: concrete code snippets for each extension point
  (custom LLM provider, Vertex AI, GCS, custom storage, law library
  plugins, Python SDK)
- Development: test/lint/build/typecheck commands in one place
- Troubleshooting: the four most common issues
- Contributing: short version inline, CONTRIBUTING.md for the rest

The commit history and design rationale move to a collapsed footnote
(<details> block) so they're available without dominating the page.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>

Capture this thread into my fork

Download a single Markdown prompt that tells Claude how to port every commit above into your working tree — adapting paths and structure to match your repo. Run it via claude -p < capture-thread-1391.md from inside the repo you want the changes in.

⬇ Download capture-thread-1391.md