feat(providers): add a Vercel AI Gateway example profile (fx)
Les mainteneurs répondent en général sous 1 jour
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 2/5
- Temps estimé
- 1-3 heures
- Accessibilité débutants
- 76/100
- Type d'issue
- Fonctionnalité
- Clarté
- Clairement spécifiée
- Activité
- Active
- Stack technique
- yaml
- Domaine
- devops
Piste de recherche
Lisez providers/openrouter.yaml et comparez sa structure de profil avec celle proposée dans providers/vercel-ai-gateway.yaml. Incluez les chemins des binaires de fx et limitez AI_GATEWAY_API_KEY à ai-gateway.vercel.sh:443 ; exécutez openshell profile lint -f providers/vercel-ai-gateway.yaml et mettez à jour le test de liste des profils de openshell-server pour qu’il reconnaisse le nouvel id. La tâche est terminée lorsque lint réussit et que le catalogue d’exemples ainsi que les tests de liste des profils acceptent le nouveau profil.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
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
- Langage dominant
- Rust
- Étoiles
- 15.4k
- Forks
- 1.7k
- Merge moyen
- 2 j 22 min
- PR mergées (30 j)
- 352
Préparer son environnement
- Aucun Dockerfile ni fichier Docker Compose
- Propose un modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de NVIDIA/OpenShell
-
state:triage-needed
Difficulté 2/5 1-3 heures Accessibilité débutants 65/100
Les mainteneurs répondent en général sous 1 jour
-
state:triage-needed
Difficulté 2/5 1-3 heures Accessibilité débutants 70/100
Les mainteneurs répondent en général sous 1 jour
-
docs: document workspace and provider label capabilitiesPeut-être pris @johntmyers l’a pris il y a 6 jours. Ouvertearea:docs
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
NVIDIA/OpenShell#4250 · 2 commentaires ·
Les mainteneurs répondent en général sous 1 jour
-
bug(driver-mxc): test helper fails to compile after gateway-name argumentPeut-être pris @feloy l’a pris il y a 8 jours. Ouvertestate:triage-needed
Difficulté 1/5 Moins d'une heure Accessibilité débutants 88/100
Les mainteneurs répondent en général sous 1 jour
-
bug: install.sh ignores XDG_CONFIG_HOME for the local gateway configPeut-être pris @fede-kamel l’a pris il y a 11 jours. Ouvertearea:cli os:linux os:macos state:validated
Difficulté 2/5 1-3 heures Accessibilité débutants 88/100
NVIDIA/OpenShell#4042 · 2 commentaires ·
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de NVIDIA/OpenShell
Issues similaires
-
Add MimirOuverte
Difficulté 1/5 Moins d'une heure Accessibilité débutants 78/100
slavakurilyak/awesome-ai-agents#759 ·
Les mainteneurs répondent en général sous 1 jour
-
bug
Difficulté 2/5 1-3 heures Accessibilité débutants 62/100
compiler-explorer/compiler-explorer#9272 ·
Les mainteneurs répondent en général sous 1 jour
-
Trash, bin or rubbish?Ouverte
Difficulté 1/5 Moins d'une heure Accessibilité débutants 63/100
pop-os/cosmic-files#2117 ·
Les mainteneurs répondent en général sous 2 jours
-
L: java:gradle L: java:maven L: ruby:bundler T: bug 🐞
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
dependabot/dependabot-core#16547 ·
Les mainteneurs répondent en général sous 1 jour
-
bug status:ready-for-test
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
UniClipboard/UniClipboard#1985 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour