Vercel AI Gateway가 Perplexity Web Search를 공식 지원합니다. 특정 모델이나 프로바이더에 종속되지 않는 범용 도구로, 모든 모델에서 동일하게 사용할 수 있습니다. 이를 통해 최신 웹 정보를 AI 질의에 보완적으로 활용해 보세요.
모델은 강력하지만, 학습 데이터와 지식 컷오프 날짜라는 한계가 있습니다. 오늘의 뉴스, 현재 가격, 최신 API 변경 사항을 물어보면 오래된 정보를 제공하거나 모른다고 답할 수밖에 없습니다.
AI Gateway의 프로바이더 독립적 웹 검색이 이 한계를 해결합니다. 코드 한 줄만으로 어떤 모델에든 실시간 웹 검색 기능을 추가할 수 있습니다. OpenAI, Anthropic, Google은 물론 AI Gateway를 통해 사용할 수 있는 모든 프로바이더에서 동작합니다.
AI SDK에서 프로바이더 독립 검색을 사용하려면, gateway.tools.perplexitySearch()을 @ai-sdk/gateway에서 가져와 tools 파라미터에 perplexity_search으로 전달하면 됩니다. 모델이 최신 정보가 필요하다고 판단하면 자동으로 웹을 검색하고, 그 결과를 응답에 반영합니다.
1import { streamText } from 'ai';2import { gateway } from '@ai-sdk/gateway';3
4const result = streamText({5 model: 'minimax/minimax-m2.1',6 prompt: 'What were the major tech announcements this week?',7 tools: {8 perplexity_search: gateway.tools.perplexitySearch(),9 },10});기본 웹 검색 기능을 제공하지 않는 모델도 많습니다. Perplexity 검색을 활용하면 AI Gateway에서 지원하는 모든 모델에 웹 검색 기능을 손쉽게 추가할 수 있습니다.
1import { streamText } from 'ai';2import { gateway } from '@ai-sdk/gateway';3
4const result = streamText({5 model: 'zai/glm-4.7', // No native search, but Perplexity works6 prompt: 'What new features were added in React 19.2?',7 tools: {8 perplexity_search: gateway.tools.perplexitySearch(),9 },10});코드 어시스턴트는 최신 패키지 버전, 최근 머지된 PR, 릴리즈 노트, 문서 업데이트 등을 알고 있을 때 훨씬 유용합니다. 오래된 정보는 빌드 실패나 보안 문제로 이어질 수 있습니다.
1import { streamText } from 'ai';2import { gateway } from '@ai-sdk/gateway';3
4const result = streamText({5 model: 'anthropic/claude-sonnet-4.5',6 prompt: 'What is the latest stable version of Next.js and what breaking changes should I know about?',7 tools: {8 perplexity_search: gateway.tools.perplexitySearch(),9 },10});프로덕션 챗봇은 비용 최적화, 장애 대응, A/B 테스트 등의 이유로 여러 모델을 함께 사용하는 경우가 많습니다. 프로바이더마다 기본 검색 도구가 다르지만, Perplexity 검색은 어떤 모델을 사용하든 동일하게 동작합니다.
1import { streamText } from 'ai';2import { gateway } from '@ai-sdk/gateway';3
4const models = ['openai/gpt-5.2', 'anthropic/claude-sonnet-4.5', 'zai/glm-4.7'];5
6const result = streamText({7 model: models[selectedIndex], // Same search logic works across any model8 prompt: 'What is the current status of the OpenAI API?',9 tools: {10 perplexity_search: gateway.tools.perplexitySearch({11 searchDomainFilter: ['status.openai.com', 'openai.com'],12 searchRecencyFilter: 'day',13 }),14 },15});가격 변동, 서비스 장애, 채용 공고, 소셜 공지 등을 모니터링하는 에이전트는 거의 실시간에 가까운 정보를 필요로 합니다. 웹 검색을 활용하면 별도의 데이터 파이프라인 없이도 에이전트가 항상 최신 정보를 유지할 수 있습니다.
1import { streamText } from 'ai';2import { gateway } from '@ai-sdk/gateway';3
4const result = streamText({5 model: 'openai/gpt-5.2',6 prompt: 'Are there any ongoing incidents affecting Vercel or AWS us-east-1?',7 tools: {8 perplexity_search: gateway.tools.perplexitySearch({9 searchDomainFilter: ['status.vercel.com', 'health.aws.amazon.com'],10 searchRecencyFilter: 'day',11 }),12 },13});AI Gateway는 Anthropic, OpenAI, Google의 기본 웹 검색도 지원합니다. 이러한 프로바이더별 도구는 각 모델에 최적화되어 있으며, 추가 기능을 제공하기도 합니다.
여러 모델에서 일관된 검색 동작이 필요하거나, 사용 중인 모델의 프로바이더가 기본 웹 검색을 지원하지 않는 경우 Perplexity를 활용하세요.
사용 가능한 모든 옵션에 대한 자세한 내용은 웹 검색 문서를 참고하세요.
AI Gateway에서 Perplexity 웹 검색은 요청 1,000건당 $5로 청구됩니다. 별도의 마크업은 없습니다. 자세한 내용은 Perplexity 요금 정책을 참고하세요.
지금 바로 AI 애플리케이션에 실시간 웹 검색을 추가해 보세요.