|
| 1 | +--- |
| 2 | +title: AI Search (formerly AutoRAG) now with More Models To Choose From |
| 3 | +description: Use models from different providers in AI Search (formerly AutoRAG) |
| 4 | +products: |
| 5 | + - ai-search |
| 6 | +date: 2025-09-25 |
| 7 | +--- |
| 8 | + |
| 9 | +AutoRAG is now AI Search! The new name marks a new and bigger mission: to make world-class search infrastructure available to every developer and business. |
| 10 | + |
| 11 | +With AI Search you can now use models from different providers like OpenAI and Anthropic. By attaching your provider keys to the AI Gateway linked to your AI Search instance, you can use many more models for both embedding and inference. |
| 12 | + |
| 13 | +To use AI Search with other [model providers](/ai-search/configuration/models/): |
| 14 | + |
| 15 | +1. **Add provider keys to AI Gateway** |
| 16 | + 1. Go to AI > AI Gateway in the dashboard. |
| 17 | + 2. Select or create an AI gateway. |
| 18 | + 3. In Provider Keys, choose your provider, click Add, and enter the key. |
| 19 | +2. **Connect a gateway to AI Search**: When creating a new AI Search, select the AI Gateway with your provider keys. For an existing AI Search, go to Settings and switch to a gateway that has your keys under Resources. |
| 20 | +3. **Select models**: Embedding models are only available to be changed when creating a new AI Search. Generation model can be selected when creating a new AI Search and can be changed at any time in Settings. |
| 21 | + |
| 22 | +Once configured, your AI Search instance will be able to reference models available through your AI Gateway when making a `/ai-search` request: |
| 23 | + |
| 24 | +```javascript |
| 25 | +export default { |
| 26 | + async fetch(request, env) { |
| 27 | + |
| 28 | + // Query your AI Search instance with a natural language question to an OpenAI model |
| 29 | + const result = await env.AI.autorag("my-ai-search").aiSearch({ |
| 30 | + query: "What's new for Cloudflare Birthday Week?", |
| 31 | + model: "openai/gpt-5" |
| 32 | + }); |
| 33 | + |
| 34 | + // Return only the generated answer as plain text |
| 35 | + return new Response(result.response, { |
| 36 | + headers: { "Content-Type": "text/plain" }, |
| 37 | + }); |
| 38 | + }, |
| 39 | +}; |
| 40 | +``` |
| 41 | + |
| 42 | +In the coming weeks we will also roll out updates to align the APIs with the new name. The existing APIs will continue to be supported for the time being. Stay tuned to the [AI Search Changelog](/changelog/?product=ai-search) and [Discord](https://discord.cloudflare.com/) for more updates! |
| 43 | + |
| 44 | + |
0 commit comments