feat(providers): add a Vercel AI Gateway example profile (fx)
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 76/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- yaml
- Ambito
- devops
Direzione di ricerca
Leggi providers/openrouter.yaml e confronta la sua struttura del profilo con quella proposta in providers/vercel-ai-gateway.yaml. Includi i percorsi dei binari di fx e limita AI_GATEWAY_API_KEY a ai-gateway.vercel.sh:443; esegui openshell profile lint -f providers/vercel-ai-gateway.yaml e aggiorna il test dell’elenco dei profili di openshell-server affinché riconosca il nuovo id. Il lavoro è completato quando lint ha esito positivo e il catalogo degli esempi e i test dell’elenco dei profili accettano il nuovo profilo.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
User Story
I use OpenShell 0.1.x with the Docker driver to run coding agents in sandboxes for a benchmark I’m building.
I need to run Vercel’s fx agent inside those sandboxes, with its AI Gateway key injected by OpenShell instead of exposed to the agent.
There is no example profile for the Vercel AI Gateway today, so I have to write and review the credential and endpoint scope myself.
Problem Statement
providers/ has example profiles for Claude Code, Codex, Copilot, Cursor and OpenRouter (used by OpenCode), but none for the Vercel AI Gateway. Clients like fx authenticate to https://ai-gateway.vercel.sh with AI_GATEWAY_API_KEY as a bearer token, and OpenShell has no reviewed profile that scopes that key to that endpoint.
Impact / Why This Matters
Without this feature, users must write their own provider profile for the AI Gateway, including the binaries paths and the credential scope.
This results in each user getting those two parts right on their own: fx’s installer puts the binary in ~/.local/bin, so a profile that only names /usr/local/bin/fx matches nothing and the key is never injected, and the easy fix is widening binaries or the endpoints
Proposed Design
Ship a reviewed example profile at providers/vercel-ai-gateway.yaml, in the same shape as providers/openrouter.yaml. Its header documents the reference fx layout (/usr/local/bin/fx, or ~/.local/bin/fx from fx's installer), the credential scope, and what it does not cover (Vercel sign-in, fx update checks, MCP servers).
Notional workflow:
openshell profile lint -f providers/vercel-ai-gateway.yaml
openshell profile import -f providers/vercel-ai-gateway.yaml --global
AI_GATEWAY_API_KEY=your-key openshell provider create \
--name vercel-ai-gateway --type vercel-ai-gateway --from-existing
openshell sandbox create --provider vercel-ai-gateway --from your-fx-image -- \
fx ask 'reply with OK'
The sandbox sees only a placeholder for AI_GATEWAY_API_KEY. OpenShell injects the real key only on requests from the fx binary to ai-gateway.vercel.sh:443.
Acceptance Criteria
-
openshell profile lint -f providers/vercel-ai-gateway.yamlpasses. - With the provider attached,
fx ask 'reply with OK'in a sandbox gets a model response throughai-gateway.vercel.sh. - The workload environment contains a placeholder, not the real key.
- Requests to other hosts, or from binaries not listed in the profile, are denied and logged as policy denials.
Alternatives Considered
- Each user writes their own profile: works, but repeats the binaries and credential-scope review per user, which is what the example profiles exist to avoid.
- Reuse the existing
openaiprofile: its endpoints and env var point at api.openai.com and OPENAI_API_KEY, so it does not cover ai-gateway.vercel.sh or AI_GATEWAY_API_KEY. - A gateway interceptor that vends the profile: valid for operators who want a managed catalog, but heavier than a reviewed YAML file for a single static endpoint.
- Supervisor middleware: it inspects allowed traffic and does not scope or inject credentials, so it does not address the gap.
- A tutorial like "Run Pi with OpenRouter": useful later, but it would still need a profile to point at.
- Naming the profile
fx: the key and endpoint belong to the gateway, and other AI SDK clients use the same key, so it followsopenrouterand is named after the service.
Agent Investigation
- Checked main (e585b49): no profile, doc, issue or PR mentions Vercel, AI Gateway or fx.
- fx source (vercel-labs/fx): default base URL https://ai-gateway.vercel.sh,
Authorization: Bearerwith AI_GATEWAY_API_KEY (VERCEL_OIDC_TOKEN as an alternative); the installer places the binary in ~/.local/bin. - A draft
providers/vercel-ai-gateway.yamlpassesopenshell profile lint(v0.1.3) and theopenshell-providersexample catalog test; theopenshell-serverprofile listing test needs the new id added. - Built fx 0.0.13 from source and ran it in a v0.1.3 sandbox (Docker driver) with the draft profile: the policy admitted ai-gateway.vercel.sh. An end-to-end request with a real key has not been run yet.
Checklist
- I've reviewed existing issues and the published docs
- This is a design proposal, not a "please build this" request
- Lingua principale
- Rust
- Stelle
- 15.4k
- Fork
- 1.7k
- Merge medio
- 2g 3h
- PR unite (30g)
- 374
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di NVIDIA/OpenShell
-
state:triage-needed
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
I maintainer di solito rispondono entro 1 giorno
-
state:triage-needed
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
I maintainer di solito rispondono entro 1 giorno
-
bug(sdk/go): edge (Cloudflare Access) token is cached for the client lifetime and never reloadedApertastate:triage-needed
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
state:triage-needed
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
docs(upgrade): no migration notes for 0.1.1, 0.1.2, or 0.1.3 (only the 0.1.0 page exists)Forse già presa Una pull request collegata a questa issue è aperta o già unita. Apertastate:triage-needed
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di NVIDIA/OpenShell
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
I maintainer di solito rispondono entro 1 giorno
-
V1 manifest lists written by Java lose added/existing/deleted file countsForse già presa @kacper-li-airspace-intelligence l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
apache/iceberg-rust#3445 ·
I maintainer di solito rispondono entro 4 giorni
-
Slack integration: links on self-hosted domains never unfurl (parseCapShareUrl only accepts cap.so / cap.link)Forse già presa @mangeshraut712 l’ha presa oggi. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
CapSoftware/Cap#2546 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
I maintainer di solito rispondono entro 1 giorno
-
area::tern-sync kind::cleanup triage::ready
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno