feat(providers): add a Vercel AI Gateway example profile (fx)
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 2/5
- Geschätzter Aufwand
- 1-3 Stunden
- Anfängerfreundlichkeit
- 76/100
- Issue-Typ
- Feature
- Klarheit
- Klar beschrieben
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- yaml
- Bereich
- devops
Rechercherichtung
Lies providers/openrouter.yaml und vergleiche dessen Profilstruktur mit der vorgeschlagenen providers/vercel-ai-gateway.yaml. Nimm die Binärpfade von fx auf und beschränke AI_GATEWAY_API_KEY auf ai-gateway.vercel.sh:443; führe openshell profile lint -f providers/vercel-ai-gateway.yaml aus und aktualisiere den Test für die Profilauflistung von openshell-server, damit er die neue ID erkennt. Erledigt ist die Aufgabe, wenn lint erfolgreich ist und der Beispielkatalog sowie die Tests für die Profilauflistung das neue Profil akzeptieren.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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
- Vorherrschende Sprache
- Rust
- Sterne
- 15.4k
- Forks
- 1.7k
- Ø Merge
- 2 T. 3 Std.
- Gemergte PRs (30 T.)
- 374
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus NVIDIA/OpenShell
-
state:triage-needed
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 65/100
Maintainer antworten meist innerhalb von 1 Tag
-
state:triage-needed
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 62/100
Maintainer antworten meist innerhalb von 1 Tag
-
bug(sdk/go): edge (Cloudflare Access) token is cached for the client lifetime and never reloadedOffenstate:triage-needed
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
Maintainer antworten meist innerhalb von 1 Tag
-
state:triage-needed
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
Maintainer antworten meist innerhalb von 1 Tag
-
state:triage-needed
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 65/100
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in NVIDIA/OpenShell
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 65/100
storytold/photocraft#5260 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 70/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 62/100
extendr/extendr.github.io#134 ·
-
awaiting-response bug
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 72/100
wildcard/caro#1655 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag