Skip to content

feat(provider)!: add Gemini Decisions provider and restructure config into grouped tables - #96

Merged
benbenbang merged 8 commits into
mainfrom
feature/gemini-docs
Nov 14, 2026
Merged

benbenbang merged 8 commits into
mainfrom
feature/gemini-docs

Conversation

@benbenbang

Copy link
Copy Markdown
Member

Jevwise previously supported a single provider with flat top-level configuration keys, which left no room to configure multiple providers side by side. This change restructures configuration into grouped tables and adds Gemini as a second decision provider, while keeping flags and environment names stable for the selected provider.

BREAKING CHANGE: flat top-level configuration keys are no longer read. Commands that load settings fail on a flat file and point to jevwise config migrate; config edit, version and mcp status/stop still run.

Configuration

  • Group settings into [general] (provider, debug, editor), [mcp] (host, port) and [provider.] (api_key, base_url, model, timeout).
  • Route provider defaults and environment per provider, reserving gemini so Jev names never configure Gemini and vice versa.
  • Add config migrate to convert flat files to grouped tables, moving keys without expanding values, keeping an owner-only backup, and refusing links, unknown or mixed keys and existing backups.
  • Share a single TOML parser across configuration readers.

Gemini provider

  • Add a minimal Gemini Decisions client that posts to /v1beta/decisions with x-goog-api-key, enforces strict response checks, caps response size, maps safety blocks to BlockedError and retries transient failures within the caller's deadline.
  • Wire gemini into decide and foreground and background MCP, using the prompt as input and options as criteria, and reporting the configured model since responses carry none.
  • Read GOOGLE_API_KEY then GEMINI_API_KEY and GOOGLE_GEMINI_BASE_URL, defaulting to the Gemini Developer API host and gemini-decision-1.

Documentation

  • Update the configuration, MCP and debug guides, README and example files for the grouped tables and describe the migration path.
  • Add a providers table and a Google API key section covering a personal AI Studio key or a Terraform-provisioned organization project key, with a GCP runbook.

Settings now live in [general] (provider, debug, editor), [mcp] (host, port)
and [provider.<name>] (api_key, base_url, model, timeout). Flags and
environment names are unchanged and apply to the selected provider.

BREAKING CHANGE: flat top-level configuration keys are no longer read.
Commands that load settings fail on a flat file and point to
jevwise config migrate; config edit, version and mcp status/stop still run.
Moves keys without validating or expanding values, keeps an owner-only
<file>.flat.bak backup, refuses links, unknown or mixed keys and existing
backups, and never prints values.
Update the configuration, MCP and debug guides, README and example files
for [general], [mcp] and [provider.<name>], and describe config migrate.
POST /v1beta/decisions with x-goog-api-key, empty criteria descriptions and
strict response checks. Refuses redirects, caps responses at 8 MiB, maps
safety blocks (400 or prompt_feedback) to BlockedError, drops upstream error
messages and retries 408/409/429/5xx and connection failures twice within
the caller's deadline.
…eserve gemini

Gemini reads GOOGLE_API_KEY, then GEMINI_API_KEY, and GOOGLE_GEMINI_BASE_URL,
defaulting to the Gemini Developer API host and gemini-decision-1. Jev names
never configure Gemini and Gemini names never configure Jev. Selecting gemini
still reports not implemented until the decision service is wired in.
Wire provider gemini into decide, foreground and background MCP. The prompt
is the shared input, options are criteria with empty descriptions and one
fixed instruction asks for the best fit. Output reports the configured model
because Gemini responses carry none.
Add a providers table and a Google API key section to the README: a personal
key from AI Studio, or an organization project key created by Terraform
(docs/gcp_adc.md runbook with placeholders). Jevwise sends the key as
x-goog-api-key and does not use ADC at runtime.
@benbenbang
benbenbang enabled auto-merge (rebase) November 14, 2026 03:12
@github-actions github-actions Bot added documentation Improvements or additions to documentation triage labels Nov 14, 2026
@benbenbang
benbenbang merged commit 8748887 into main Nov 14, 2026
5 checks passed
@benbenbang
benbenbang deleted the feature/gemini-docs branch November 14, 2026 03:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation triage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant