Proposal: a Rust port of the Laravel AI SDK (laravel-ai-rs)

Aperta
#799 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à
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
15/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
rust
Ambito
ai, backend

Direzione di ricerca

Start by reviewing the proposed port at https://github.com/carrot-on-the-horse/laravel-ai-rs and compare its scope with the Rust framework’s conventions. The issue asks whether Laravel wants to adopt it, move it under the Laravel organization, or keep it as a community package; no implementation files or acceptance criteria are named, so first-timer work depends on a maintainer decision.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Hi! Laravel for Rust doesn't have an AI SDK yet, and we rely on laravel/ai heavily, so we ported it:

https://github.com/carrot-on-the-horse/laravel-ai-rs

How it was built. Test-first: every Pest test in laravel/ai was listed, and each has a Rust test with the same name (snake_case) that was written before the code. tools/spec.py status tracks coverage: 3,116 of 3,210 PHP tests are ported and passing. The remaining 94 are documented skips for PHP-only behaviour (subclassing, Eloquent models, serializing closures, console commands), each explained at the top of its test file.

What's covered

  • Agents: tools, structured output, middleware, events, failover, streaming, sub-agents, skills
  • Conversation memory in the database (migrations included), with titles and failed-turn recording
  • Tool approvals: a run pauses on a gated tool and resumes from the caller's decisions
  • Queued and broadcast prompts; Vercel AI SDK data protocol and AG-UI stream responses
  • Embeddings, images, audio, transcription, reranking, classification, files and vector stores
  • Filesystem and MCP tools
  • Fakes and assertions for every operation
  • All 20 drivers: OpenAI, Anthropic, Gemini, Azure OpenAI, Bedrock, Mistral, Groq, xAI, DeepSeek, Cohere, Ollama, OpenRouter, OpenAI-compatible, Open Responses, Laravel Cloud, VoyageAI, Jina, ElevenLabs, TypeSafe

It uses the framework's own HTTP client, so client::fake() plays the role of Http::fake() in the provider tests, and the config reads the same environment variables as config/ai.php.

Live testing. The 70 integration tests are ported as opt-in tests. Agent prompts, streaming, structured output and tools pass against OpenAI, Anthropic and Groq; OpenAI embeddings pass too.

Known gaps

  • No make:agent console commands yet
  • Retries don't wait out a provider's Retry-After delay
  • A queued agent must be serializable, and then/catch callbacks run only in the process that queued it

License: MIT, the same as laravel/ai.

We'd be glad to contribute it as the official package, move it under the Laravel org, or keep it as a community package. Happy to adapt it to whatever conventions you prefer for first-party Rust packages.

Or, if you already have unpublished work in the same direction, I'd be happy to help test it and contribute.

Lingua principale
Rust
Stelle
847
Fork
174
Merge medio
5h 40m
PR unite (30g)
167

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

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 laravel/rust-framework

Tutte le issue di laravel/rust-framework

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.