惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

V
V2EX
博客园 - 叶小钗
WordPress大学
WordPress大学
N
Netflix TechBlog - Medium
M
MIT News - Artificial intelligence
美团技术团队
aimingoo的专栏
aimingoo的专栏
博客园_首页
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Microsoft Security Blog
Microsoft Security Blog
Last Week in AI
Last Week in AI
The GitHub Blog
The GitHub Blog
小众软件
小众软件
T
Tailwind CSS Blog
Martin Fowler
Martin Fowler
B
Blog RSS Feed
月光博客
月光博客
量子位
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Hugging Face - Blog
Hugging Face - Blog
IT之家
IT之家
Y
Y Combinator Blog
B
Blog
MyScale Blog
MyScale Blog

Vercel News

Vercel Open Source Program: Winter 2026 cohort How Notion Workers run untrusted code at scale with Vercel Sandbox How we run Vercel's CDN in front of Discourse From idea to secure checkout in minutes with Stripe Building Slack agents can be easy Scaling redirects to infinity on Vercel Advancing Python typing Gamma builds design-first agents with Vercel How Avalara turns pipe dreams into patent-pending with v0 Keeping community human while scaling with agents How OpenEvidence built a healthcare AI that physicians actually trust Security boundaries in agentic architectures Skills Night: 69,000+ ways agents are getting smarter Video Generation with AI Gateway We Ralph Wiggumed WebStreams to make them 10x faster How Stably ships AI testing agents in hours, not weeks How we built AEO tracking for coding agents Anyone can build agents, but it takes a platform to run them Introducing Geist Pixel The Vercel AI Accelerator is back with $6m in credits Making agent-friendly pages with content negotiation The Vercel OSS Bug Bounty program is now available Introducing the new v0 Run untrusted code with Vercel Sandbox, now generally available How Stripe built a game-changing app in a single flight with v0 How Sensay went from zero to product in six weeks AGENTS.md outperforms skills in our agent evals Agent skills explained: An FAQ Testing if "bash is all you need" AWS databases are now live on the Vercel Marketplace and v0
Using the AI SDK to fix edge-case errors in our code - Ve...
2024-08-15 · via Vercel News

3 min read

How our team at Vercel used AI-based logic to improve our domain registry experience for international domains.

Recently, there was an issue affecting our customers when trying to purchase a domain containing non-English characters. This problem became apparent when these domain purchases consistently failed, creating a significant roadblock for users wanting to expand their online presence with internationalized domain names (IDNs).

Link to headingThe bug background

The root of the problem was the encoding process. Domains with non-English characters are encoded in Punycode format. This encoding allows for a wide range of international characters to be represented using the limited character set of the ASCII standard. However, when we sent these encoded domains to our domain registrar, OpenSRS, we encountered cryptic error messages that gave little indication of the underlying issue.

Through a deep dive into the OpenSRS documentation, we discovered that purchasing a Punycode domain requires an associated language code. Although our system had a placeholder for this language code, it was left as optional and consequently, was not being utilized. This omission was the crux of our issue.

The next challenge was determining the correct language code for each domain. Initially, we attempted to use Common Language Detector 2 (CLD2), a library designed to detect the language of a text. Unfortunately, the domain names were too short for CLD2 to accurately determine the language.

Link to headingAI, our most valuable player

To overcome this, we turned to the Vercel AI SDK. The AI SDK is our open-source toolkit designed to simplify the integration and deployment of AI models in applications. The unified interface lets you work with various AI models and providers, so you can seamlessly switch between them with minimal code changes.

First, we chose a method. We went with generateText because we needed a singular text output in the form of a 3 character language code. Since this process isn't interactive, meaning there's no back and forth with the user, there's no need to use streamText. We didn’t need generateObject either, which uses schemas to give you structured data, because our use case isn't complex enough to require object generation.

With the AI SDK, we can easily test out different models and look for the best accuracy with a large enough context window for us to pass in the list of language codes we wanted the model to choose from. This led us to GPT-4o from OpenAI.

GPT-4o was able to determine the appropriate language code for each domain. The results were remarkable. The AI successfully identified the correct language codes, even for the shortest and most complex domain names.

We rigorously tested the solution provided by GPT-4o on previously failed domain purchases of the last two months and achieved a 100% success rate. Encouraged by these results, we deployed the solution to production. Since then, we've had numerous successful Punycode domain purchases, marking a significant improvement in our system's user experience.

Link to headingLeveraging AI in every development process

Turning to AI to solve complex problems is becoming second nature. Thanks to the AI SDK, our system correctly handles Punycode domains with the appropriate language codes, we've removed a significant barrier for our international users and enhanced the overall functionality of our platform.

Unlock rapid AI development

Build AI-powered applications with the AI SDK.

Get started with the AI SDK