openvidia AGENTS.md

Project instructions for OpenVidia, a local proxy that sends requests from different AI clients to NVIDIA NIM using a shared pool of API keys. They describe its mission, architecture, and main modules.

In plain words
What is it for?
Use them when working on OpenVidia's proxy, desktop dashboard, API compatibility shims, key rotation, cooldowns, request limits, or automatic context reduction.
Why use it?
They give developers the project context needed to change or operate the proxy without misunderstanding how clients, key rotation, limits, and compatibility layers fit together.

Instructions file for CodexOpenCode

Install

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.

agentmods
npx agentmods add instructions/autcir/openvidia/agents-md
Clone the repo
git clone --depth 1 https://github.com/autcir/openvidia

Made for: Codex, OpenCode.

Per session 978 This file is loaded in full into every session.
When invoked 978 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5 $0.00978 $0.00978
Opus 5 $0.00489 $0.00489
Sonnet 5 $0.00196 $0.00196
Haiku 4.5 $0.00098 $0.00098

Measured yesterday against content hash e8a23aa058f6, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

openvidia AGENTS.md scanned grade A with 0 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 yesterday.

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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

AGENTS.md · 88 lines

How it starts

The opening of the file, as written. The whole thing — 88 lines — stays where its author put it; the contents beside it link to each section on GitHub.

OpenVidia — Multi-key proxy for NVIDIA NIM

Mission

Proxy multi-chiave per NVIDIA NIM con dashboard desktop nativa. Pool di API key free-tier dietro un singolo endpoint con rotazione automatica, cooldown per-key, RPM limiting sliding-window, e auto-compaction.


Architettura

Client CLI → localhost:1919/v1 → Proxy Engine → integrate.api.nvidia.com/v1
                                    │
                                    ├─ /v1/chat/completions  (catch-all: opencode, Grok, qualsiasi client OpenAI)
                                    ├─ /v1/responses         (shim: Codex CLI)
                                    ├─ /v1/messages          (shim: Claude Code)
                                    └─ /v1/models            (lista modelli upstream)

Moduli core

File Righe Ruolo
proxy_app.py ~573 FastAPI app factory, routing, health check, pre-warm
proxy_state.py ~730 Stato thread-safe: KeyState, cooldown, RPM tracker, circuit breaker
responses_shim.py ~1126 Shim /v1/responses/v1/chat/completions (Codex CLI)
anthropic_shim.py ~705 Shim /v1/messages/v1/chat/completions (Claude Code)
compaction.py ~784 Auto-compaction contesto per context overflow
config.py ~351 Path config cross-platform, timeout, model options
__main__.py ~727 Entry point, setup CLI (opencode/codex/grok), tray, server manager
webui.py ~472 Dashboard web (pywebview), API endpoints
server_manager.py 107 Avvio/stop uvicorn, binding dual-stack
safe_file.py 197 Backup atomico file di config
_upstream_utils.py 43 Semaphore globale + detection ResourceExhausted

Rotazione chiavi condivisa

_rotation_phase() in responses_shim.py è la funzione condivisa per tutti i percorsi:

  • max 5 tentativi per fase, 3 fasi con 1s di pausa
  • saturation gate: se <5% chiavi live, fast-fail con 503
  • probe timeout (90s) sul primo tentativo per detection dead-model veloce
  • send timeout (180s) sui tentativi successivi
  • gestisce 429 ResourceExhausted (transient, key untouched) vs 429 rate-limit (cooldown)
  • importata da proxy_app.py (catch-all), anthropic_shim.py (Claude Code)

Read the full file on GitHub · 88 lines

Changes

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.

  1. yesterday First seen · 88 lines · 978 tokens per session scan A e8a23aa058f6

Subscribe to this mod's changes

openvidia AGENTS.md is an instructions file published in the GitHub repository autcir/openvidia (4 stars, last pushed 17d ago), licensed MIT. It adds 978 tokens to every session, about $0.0049 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.