Skip to content
This repository was archived by the owner on Jun 8, 2026. It is now read-only.

Add AnyAPI as new Generator option#471

Open
es697 wants to merge 1 commit into
weaviate:mainfrom
es697:main
Open

Add AnyAPI as new Generator option#471
es697 wants to merge 1 commit into
weaviate:mainfrom
es697:main

Conversation

@es697

@es697 es697 commented May 30, 2026

Copy link
Copy Markdown

Adds AnyAPI as a new LLM Generator option in Verba. AnyAPI is a unified AI platform that provides access to 400+ models from OpenAI, Anthropic, Google, Meta, DeepSeek and more through a single OpenAI-compatible API endpoint.

Changes

  • New file: goldenverba/components/generation/AnyAPIGenerator.py — OpenAI-compatible streaming chat completions via aiohttp
    • API key via ANYAPI_API_KEY env var or in-UI config
    • Optional ANYAPI_BASE_URL (defaults to https://api.anyapi.ai/v1)
    • Optional ANYAPI_MODEL (defaults to first model from auto-fetched list)
    • Auto-fetches model list from GET /v1/models when API key is present; falls back to curated default list when no key is configured
  • Register AnyAPIGenerator() in both dev and production generator lists in goldenverba/components/managers.py
  • Add AnyAPI env vars to .env.example

How to use

  1. Get an API key at https://anyapi.ai
  2. Set it as ANYAPI_API_KEY env var, or paste it into the Verba UI's API Key field after selecting AnyAPI in the Generator dropdown
  3. Pick a model (e.g. openai/gpt-5.1, anthropic/claude-opus-4-7, deepseek/deepseek-v3-2, google/gemini-3-pro-preview, meta/llama-4-maverick)
  4. Chat as normal

Docs: https://docs.anyapi.ai · Models: https://anyapi.ai/ai-models


I have read and I agree to the terms of the Weaviate Contributor License Agreement.

AnyAPI is a unified AI platform that provides access to hundreds of
AI models (OpenAI, Anthropic, Google, Meta, DeepSeek, and more)
through a single OpenAI-compatible API endpoint.

- New file: goldenverba/components/generation/AnyAPIGenerator.py
  - OpenAI-compatible streaming chat completions via aiohttp
  - Reads API key from ANYAPI_API_KEY env var or in-UI config
  - Optional ANYAPI_BASE_URL (defaults to https://api.anyapi.ai/v1)
  - Auto-fetches model list from GET /v1/models when API key present
  - Falls back to curated default list when no key configured
- Register AnyAPIGenerator() in both dev and production generator lists
- Add ANYAPI env vars to .env.example

@orca-security-eu orca-security-eu Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Orca Security Scan Summary

Status Check Issues by priority
Passed Passed Infrastructure as Code high 0   medium 0   low 0   info 0 View in Orca
Passed Passed SAST high 0   medium 0   low 0   info 0 View in Orca
Passed Passed Secrets high 0   medium 0   low 0   info 0 View in Orca
Passed Passed Vulnerabilities high 0   medium 0   low 0   info 0 View in Orca

@weaviate-git-bot

Copy link
Copy Markdown

To avoid any confusion in the future about your contribution to Weaviate, we work with a Contributor License Agreement. If you agree, you can simply add a comment to this PR that you agree with the CLA so that we can merge.

beep boop - the Weaviate bot 👋🤖

PS:
Are you already a member of the Weaviate Forum?

@es697

es697 commented Jun 1, 2026

Copy link
Copy Markdown
Author

I have read and I agree to the terms of the Weaviate Contributor License Agreement.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants