Last 12 weeks · 10 commits
3 of 6 standards met
Repository: vercel/v0-sdk. Description: SDK for the v0 Platform API Stars: 445, Forks: 84. Primary language: TypeScript. Languages: TypeScript (96.9%), CSS (1.6%), JavaScript (1.5%). Homepage: https://v0-sdk.dev Latest release: @v0-sdk/ai-tools@0.3.6 (5d ago). Open PRs: 3, open issues: 25. Last activity: 1d ago. Community health: 62%. Top contributors: ctate, github-actions[bot], nandorojo, harshpreet931, vercel[bot], alex-grover, SferaDev, haydenbleasel.
Current behavior Given a project, I try to get and show the latest version screenshot, I get the same screenshot even project is private or public, published or not. Expected behavior The screenshot actually shows the latest version of the web app. Steps to reproduce 1. Create a project via API 2. Get project details via API Example
This PR introduces an optional parameter to the v0 SDK, enabling more flexible request customization. Problem/Issue/Goal: The v0 SDK lacked a mechanism to include custom HTTP headers in requests. Users needed the ability to pass specific headers for various use cases (e.g., authentication, custom metadata). Fix/Solution: Extended and to include an optional parameter. This allows developers to define and send custom headers with requests made via the v0 SDK. Chat link: https://v0.app/chat/33LFeJPhvrO
📝 Description This PR replaces raw, generic catch-all errors with strongly-typed, descriptive HTTP error classes. Instead of logging opaque JSON or stack traces, callers can now specific errors and get: A clear, human‑readable message A property for programmatic handling Original Example from SDK Documentation The SDK docs show the following snippet, but accessing will always be because caught errors are typed as : In practice, does not exist and evaluating it yields . Before ✨ Benefits Better UX: Users see clear, actionable messages instead of raw JSON. Simplified Debugging: Developers inspect instead of parsing status codes. Performance: No round‑trip to read full response bodies for common cases. Maintainability: One central place defines all messages and codes. 🎯 Status Codes Covered ⚠️ Development Only Explains the purpose and usage of the function, which is not exported in the public SDK API. It serves purely as an internal helper during development. Factory function** that generates custom subclasses with: A default human-readable message A custom property reflecting the error type An optional property for programmatic checks Usage (development) Internally, we use it to define all HTTP error classes: 🎯 TypeScript Support V0Error Union Type For better TypeScript integration, especially with React state management, we provide a union type that includes all possible V0 errors: 🧪 Testing [x] Verify error messages are displayed correctly for each status code [x] Ensure fallback case handles unexpected status codes [x] Test that error handling doesn't break existing functionality
Description When initializing chats via the v0 SDK using ZIP archive initialization ( with ), the created chat automatically enters v0 Beta mode. In this mode, the returned by the Platform API consistently returns HTTP 404, preventing us from displaying previews to our users. Environment SDK Version: v0.15.1 React SDK Version: v0.4.0 Backend: Node.js / NestJS Steps to Reproduce 1. Create a project via 2. Initialize a chat with ZIP archive: 3. Access Expected Behavior Chat should operate in normal (non-beta) mode should be accessible and return HTTP 200 with preview content Actual Behavior Chat enters "v0 beta" mode (UI shows: "This chat is on the v0 beta") returns HTTP 404 Subsequent calls to also return a 404 Business Impact This is a P0 production issue for us: Our product uses v0 SDK to power an App Builder feature with template-based app creation The preview functionality () is the core UX of this feature All template-based app creation is currently non-functional Multiple enterprise customers are affected No viable workaround has been identified Feature Request Please consider adding an API parameter (e.g., or ) that allows SDK consumers to explicitly opt out of beta features for production use cases. Additional Context We are happy to provide: Sample values for debugging Full request/response logs A call to discuss and reproduce the issue Thank you for your attention to this urgent matter.