Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add davidtoby/agent-skills --skill litellm-vertex-gemini-local-gatewaygit clone --depth 1 https://github.com/davidtoby/agent-skillsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/davidtoby/agent-skills/litellm-vertex-gemini-local-gateway)<a href="https://agentmods.dev/skills/davidtoby/agent-skills/litellm-vertex-gemini-local-gateway"><img src="https://agentmods.dev/badge/skills/davidtoby/agent-skills/litellm-vertex-gemini-local-gateway/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/davidtoby/agent-skills/litellm-vertex-gemini-local-gateway"><img src="https://agentmods.dev/badge/skills/davidtoby/agent-skills/litellm-vertex-gemini-local-gateway.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00105 | $0.02448 |
| Opus 5 | $0.00053 | $0.01224 |
| Sonnet 5 | $0.00021 | $0.00490 |
| Haiku 4.5 | $0.00011 | $0.00245 |
Grade D, and why
litellm-vertex-gemini-local-gateway scanned grade D with 3 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Reaches for credential fileshighPrivilege escalation
SSH keys, cloud credentials, git-credentials, .npmrc, /etc/shadow: reading these is how a config file becomes a credential leak.
- `~/.config/gcloud/application_default_credentials.json` Reads agent configuration directoriesmediumAgent snooping
.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.
Back up `~/.claude/settings.json`, then set: Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
curl -sS -H "Authorization: Bearer $LITELLM_MASTER_KEY" http://127.0.0.1:4000/v1/models How it starts
The opening of the file, as written. The whole thing — 270 lines — stays where its author put it; the contents beside it link to each section on GitHub.
LiteLLM Vertex Gemini Local Gateway
Build a local LiteLLM deployment on macOS that:
- uses Vertex AI ADC for Gemini
- exposes an Anthropic-compatible endpoint such as
http://127.0.0.1:4000 - auto-starts after login via LaunchAgent and stays resident in the background
- lets Claude Code use Gemini through LiteLLM
- lets OpenClaw use the same local gateway as a model option without disturbing the existing default unless requested
Quick start
- Confirm prerequisites:
- macOS
uvpython3- Vertex AI ADC already available or obtainable
claudeinstalled if Claude Code integration is requestedopenclawinstalled if OpenClaw integration is requested
- Read
references/fresh-macos-runbook.mdfirst. - Install LiteLLM with Google support:
uv tool install 'litellm[proxy,google]'
- Generate or hand-write the gateway project files using
scripts/render_gateway_bundle.pyorreferences/config-templates.md. - Put secrets only in
.envand never echo them back to the user. - Install/load the LaunchAgent and verify port listening.
- Verify both
/v1/modelsand/v1/messages. - Wire Claude Code.
- Wire OpenClaw.
- Report changed files, test commands, rollback paths, and any provider-specific caveats.
What makes this setup fragile
The most important pitfalls are:
- LiteLLM can appear healthy on
/v1/modelsbut still fail real inference untilgoogleextras are installed. - Claude Code must point
ANTHROPIC_BASE_URLat the LiteLLM root, not/v1. - Python/system proxy settings can break loopback traffic unless
NO_PROXY=127.0.0.1,localhost,::1is forced. - OpenClaw per-run gateway
--modeloverrides may be unauthorized in some local setups; in that case use--localwith the explicit provider/model id or switch the default withopenclaw models set.
Read references/troubleshooting.md before improvising.
Workflow
1. Confirm prerequisites and choose paths
Choose or confirm:
PROXY_DIR— local project directory, e.g.~/GitHub-Codebase/litellm-vertex-proxyLITELLM_HOST— usually127.0.0.1LITELLM_PORT— usually4000- LaunchAgent label — e.g.
com.example.litellm-vertex-proxy - Vertex project id
- Vertex location, usually
global - LiteLLM model alias, e.g.
gemini-3.1-pro-preview
What ships with it
12 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
- assets/example_asset.txt 95 B
- references/api_reference.md 1.0 KB
- references/claude-code-integration.md 1.8 KB
- references/config-templates.md 3.8 KB
- references/fresh-macos-runbook.md 4.0 KB
- references/openclaw-integration.md 1.9 KB
- references/troubleshooting.md 1.9 KB
- scripts/claude-direct-wrapper.sh 628 B runs code
- scripts/claude-gemini-wrapper.sh 858 B runs code
- scripts/claude-sonnet-direct-wrapper.sh 334 B runs code
- scripts/example.py 1.1 KB runs code
- scripts/render_gateway_bundle.py 3.8 KB runs code
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 8d ago First seen · 270 lines · 105 tokens per session scan D 57aec89c2762
litellm-vertex-gemini-local-gateway is a skill published in the GitHub repository davidtoby/agent-skills (10 stars, last pushed 1mo ago), licensed MIT. It adds 105 tokens to every session and 2,448 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it D with 3 findings (reaches for credential files, reads agent configuration directories, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.
Other skills, from other repositories
azure-data-factory
Expert knowledge for Azure Data Factory development including troubleshooting, best practices, decision making, architecture & design patterns, limits & quotas, security, configuration, integrations & coding patterns, and deployment. Use when building ADF pipelines, mapping data flows, SSIS IR/SHIR, CI/CD deployments…
azure-databricks
Expert knowledge for Azure Databricks development including troubleshooting, best practices, decision making, architecture & design patterns, limits & quotas, security, configuration, integrations & coding patterns, and deployment. Use when using Unity Catalog, Lakeflow pipelines, Genie/AI Runtime, Delta…
azure-hdinsight
Expert knowledge for Azure HDInsight development including troubleshooting, best practices, decision making, architecture & design patterns, limits & quotas, security, configuration, integrations & coding patterns, and deployment. Use when working with HDInsight Spark/Hive/Kafka/HBase clusters, Ambari/Oozie pipelines…
azure-microsoft-discovery
Expert knowledge for Azure Microsoft Discovery development including troubleshooting, best practices, decision making, architecture & design patterns, limits & quotas, security, configuration, integrations & coding patterns, and deployment. Use when building Discovery Engine shared sessions, ACR tool images, REST…
azure-data-science-vm
Expert knowledge for Azure Data Science Virtual Machines development including troubleshooting, decision making, architecture & design patterns, security, configuration, integrations & coding patterns, and deployment. Use when managing DSVM images/tools, IaC deployment (Bicep/ARM), Key Vault secrets, MLflow, or…
ehr-analysis
End-to-end EHR predictive modeling pipeline with PyHealth, covering dataset loading, task definition, model training, evaluation, calibration, and clinical interpretation.