{"id":28741271,"url":"https://github.com/coder/aisdk-go","last_synced_at":"2026-04-25T12:36:47.380Z","repository":{"id":286408457,"uuid":"961245256","full_name":"coder/aisdk-go","owner":"coder","description":"A Go implementation of Vercel's AI SDK Data Stream Protocol.","archived":false,"fork":false,"pushed_at":"2025-11-20T02:02:43.000Z","size":77,"stargazers_count":40,"open_issues_count":5,"forks_count":9,"subscribers_count":4,"default_branch":"main","last_synced_at":"2026-04-25T00:41:42.027Z","etag":null,"topics":["ai","go","sdk","vercel"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/coder.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-04-06T04:44:40.000Z","updated_at":"2026-03-16T15:22:45.000Z","dependencies_parsed_at":"2025-06-05T23:37:53.273Z","dependency_job_id":"6d500d38-3ba4-4009-ba96-6dc6eb6f410f","html_url":"https://github.com/coder/aisdk-go","commit_stats":null,"previous_names":["kylecarbs/aisdk-go","coder/aisdk-go"],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/coder/aisdk-go","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coder%2Faisdk-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coder%2Faisdk-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coder%2Faisdk-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coder%2Faisdk-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/coder","download_url":"https://codeload.github.com/coder/aisdk-go/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coder%2Faisdk-go/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32262801,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-25T09:15:33.318Z","status":"ssl_error","status_checked_at":"2026-04-25T09:15:31.997Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","go","sdk","vercel"],"created_at":"2025-06-16T07:11:34.341Z","updated_at":"2026-04-25T12:36:47.341Z","avatar_url":"https://github.com/coder.png","language":"Go","readme":"# aisdk-go\n\n[![GitHub Release](https://img.shields.io/github/v/release/coder/aisdk-go?color=6b9ded\u0026sort=semver)](https://github.com/coder/aisdk-go/releases)\n[![GoDoc](https://godoc.org/github.com/coder/aisdk-go?status.svg)](https://godoc.org/github.com/coder/aisdk-go)\n[![CI Status](https://github.com/coder/aisdk-go/workflows/ci/badge.svg)](https://github.com/coder/aisdk-go/actions)\n\n\u003e [!WARNING]  \n\u003e This library is super new and may change a lot.\n\nA Go implementation of Vercel's AI SDK [Data Stream Protocol](https://sdk.vercel.ai/docs/ai-sdk-ui/stream-protocol#data-stream-example).\n\n- Supports OpenAI, Google, and Anthropic (with Bedrock support)\n- Examples for integrating `useChat`\n- Chain tool usage in Go, just like `maxSteps`\n\n```ts\n// frontend.tsx\n\nconst { messages } = useChat({\n    // Points to our Go backend!\n    api: \"/api/chat\",\n})\n```\n\n```go\n// backend.go\n\n// Accept the POST request...\nvar req *aisdk.Chat\n\nmessages, err := aisdk.MessagesToOpenAI(req.Messages)\nif err != nil {\n    http.Error(w, err.Error(), http.StatusInternalServerError)\n    return\n}\n\n// Convert the http.ResponseWriter to a Data Stream.\ndataStream := aisdk.NewDataStream(w)\nstream := openaiClient.Chat.Completions.NewStreaming(...)\n\naisdk.PipeOpenAIToDataStream(stream, dataStream)\n```\n\n## Development\n\nRun tests with `go test`. Start the `useChat` demo with:\n\n```bash\n# any or all of these can be set\nexport OPENAI_API_KEY=\u003capi-key\u003e\nexport ANTHROPIC_API_KEY=\u003capi-key\u003e\nexport GOOGLE_API_KEY=\u003capi-key\u003e\n\ncd demo\nbun i\nbun dev\n```","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoder%2Faisdk-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcoder%2Faisdk-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoder%2Faisdk-go/lists"}