Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

feat(providers): add a Vercel AI Gateway example profile (fx)

Aperta Adatta ai principianti
#4,440 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

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

state:triage-needed
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.yaml passes.
  • With the provider attached, fx ask 'reply with OK' in a sandbox gets a model response through ai-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 openai profile: 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 follows openrouter and 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: Bearer with AI_GATEWAY_API_KEY (VERCEL_OIDC_TOKEN as an alternative); the installer places the binary in ~/.local/bin.
  • A draft providers/vercel-ai-gateway.yaml passes openshell profile lint (v0.1.3) and the openshell-providers example catalog test; the openshell-server profile 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

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di NVIDIA/OpenShell

Tutte le issue di NVIDIA/OpenShell

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.