Connecting Raycast AI to an OpenAI-Compatible Gateway
Описание и применение
Пользователи Raycast теперь могут выбирать модели из шлюза CometAPI прямо в лаунчере, не открывая отдельное приложение, благодаря настройке custom provider в providers.yaml и проверке подключения через curl.
Задача
Integrating a custom OpenAI‑compatible gateway into Raycast AI so users can select models directly from the desktop launcher without opening another app.
Результат
Raycast users can now select and use CometAPI models directly from the launcher, enabling quick AI tasks without leaving the desktop environment.
Рабочий процесс
- 1. Verify macOS, recent Raycast, and a valid CometAPI API key.
- 2. Test connectivity with curl:
curl --fail-with-body --silent --show-error 'https://api.cometapi.com/v1/models' --header "Authorization: Bearer $GATEWAY_API_KEY". - 3. Open Raycast Preferences → AI → Custom Providers → Reveal Providers Config.
- 4. Copy the template
providers.template.yamltoproviders.yamlin the revealed directory. - 5. Add a provider entry: set
id,name, andbase_url: https://api.cometapi.com/v1. - 6. Add the API key via Raycast’s secure credential field or environment variable.
- 7. (Optional) Let Raycast discover models via GET /v1/models or list models manually in the config.
- 8. Reload or restart Raycast, then refresh models if available.
- 9. Open Quick AI, select the new provider’s model, and send a short prompt to test.
- 10. Debug issues: check file location, token validity, model discovery, streaming behavior, and latency.
- 11. Optimize workflow: choose lightweight models for quick tasks, higher‑capacity models for deep reasoning, track usage, and create reusable AI Commands.
Доказательства
I’d test authentication and model-list access before touching Raycast. With your token already available locally as GATEWAY_API_KEY, this requests the OpenAI-style models endpoint:
Open Raycast Preferences → AI → Custom Providers → Reveal Providers Config.
Add the token through Raycast’s custom API-key or secure credential fields where supported.
- Дата записи: 2026-09-22T16:00:26.404Z