From a97387d85029b1adb0cd76aeede8af7a23039d92 Mon Sep 17 00:00:00 2001 From: jax-novita Date: Fri, 31 Jul 2026 08:38:14 +0800 Subject: [PATCH 1/2] docs(buzz-agent): add Novita AI as a supported OpenAI-compat provider MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Novita AI is an OpenAI-compatible inference endpoint (https://api.novita.ai/v3/openai), so it slots into the existing provider=openai path the same way vLLM, llama.cpp, Ollama, and Block Gateway already do — no new Provider enum variant needed. Adds it to the README's provider diagram and endpoint table, and to the is_openai_host host matrix test alongside OpenRouter and Block Gateway. Signed-off-by: jax-novita --- crates/buzz-agent/README.md | 5 +++-- crates/buzz-agent/src/config.rs | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/crates/buzz-agent/README.md b/crates/buzz-agent/README.md index f138e4a4f1..c4ded52133 100644 --- a/crates/buzz-agent/README.md +++ b/crates/buzz-agent/README.md @@ -24,7 +24,7 @@ Anthropic Messages API, OpenRouter, or any OpenAI-compat (vLLM, llama.cpp, Databricks, - Block Gateway, Ollama, …) + Block Gateway, Novita AI, Ollama, …) ``` A client sends `session/prompt`. The agent loops: call the LLM → get tool calls → run them via MCP → feed results back → repeat. The loop terminates when the LLM stops asking for tools, the round cap is hit, or the client cancels. @@ -142,7 +142,7 @@ Everything is environment variables. No flags, no config files. (We are a subpro | `ANTHROPIC_API_VERSION` | `2023-06-01` | | | `OPENAI_COMPAT_API_KEY` | — | Required when provider=openai. | | `OPENAI_COMPAT_MODEL` | — | Required when provider=openai. | -| `OPENAI_COMPAT_BASE_URL` | `https://api.openai.com/v1` | Point at vLLM, llama.cpp, Ollama, etc. | +| `OPENAI_COMPAT_BASE_URL` | `https://api.openai.com/v1` | Point at vLLM, llama.cpp, Novita AI, Ollama, etc. | | `OPENAI_COMPAT_API` | `auto` | `auto` \| `chat` \| `responses`. `auto` picks Responses for `*.openai.com`, Chat Completions everywhere else. | | `OPENROUTER_API_KEY` | — | Required when provider=openrouter. | | `OPENROUTER_MODEL` | — | Required when provider=openrouter. Use OpenRouter's `vendor/model` id, e.g. `anthropic/claude-sonnet-4.5`. | @@ -177,6 +177,7 @@ Everything is environment variables. No flags, no config files. (We are a subpro | llama.cpp | `openai` | `POST {base}/chat/completions` | any tool-calling GGUF | | Ollama | `openai` | `POST {base}/chat/completions` | llama3.1, qwen2.5-coder | | Block Gateway | `openai` | `POST {base}/chat/completions` | gpt-5, claude | +| Novita AI | `openai` | `POST {base}/chat/completions` | deepseek/deepseek-v3.2, moonshotai/kimi-k2.6 | | OpenRouter | `openrouter` | `POST {base}/chat/completions` | anything they route (extended-thinking replay, provider-agnostic tool calling) | | Databricks | `databricks` | `POST {host}/serving-endpoints/{model}/invocations` | goose-claude-4-6-sonnet | | Databricks AI Gateway v2 | `databricks_v2` | `POST {host}/ai-gateway/{provider}/v1/...` | databricks-gpt-5-5, databricks-claude-opus-4-7 | diff --git a/crates/buzz-agent/src/config.rs b/crates/buzz-agent/src/config.rs index a0e64f1a9d..f9f9927af2 100644 --- a/crates/buzz-agent/src/config.rs +++ b/crates/buzz-agent/src/config.rs @@ -1060,7 +1060,7 @@ fn parse_openai_api(raw: Option<&str>) -> Result { /// `true` when `base_url` is an official OpenAI host. Hosts on /// `*.openai.com` get Responses under `Auto`; everything else (vLLM, -/// Ollama, OpenRouter, Block Gateway, …) gets Chat Completions. +/// Ollama, OpenRouter, Novita AI, Block Gateway, …) gets Chat Completions. /// Lookalike-safe: `api.openai.com.evil.example` returns `false`. pub fn is_openai_host(base_url: &str) -> bool { let rest = match base_url @@ -1309,6 +1309,7 @@ mod tests { ("http://eu.api.openai.com/v1", true), ("http://localhost:11434/v1", false), ("https://openrouter.ai/api/v1", false), + ("https://api.novita.ai/v3/openai", false), ("https://gateway.block.example/v1", false), ("https://api.openai.com.evil.example/v1", false), ("not a url", false), From 7e8be6e48f8400f142dab4b977b4c6bb32a30ab7 Mon Sep 17 00:00:00 2001 From: jax-novita Date: Sat, 1 Aug 2026 22:48:42 +0800 Subject: [PATCH 2/2] fix(buzz-agent): correct Novita base URL in host-matrix test to current documented endpoint The is_openai_host_matrix test case used https://api.novita.ai/v3/openai. That path still resolves today, but Novita's current documentation (novita.ai/docs/guides/llm-api) no longer shows it; the current documented OpenAI-compatible endpoint is https://api.novita.ai/openai. Verified live 2026-08-01: both paths return identical /models and /chat/completions results, and both are non-openai.com hosts so the test's expected boolean (false) is unchanged either way -- this corrects the literal, not the assertion. README.md's provider table and topology diagram do not mention any base URL literal for Novita, so no change needed there. --- crates/buzz-agent/src/config.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/buzz-agent/src/config.rs b/crates/buzz-agent/src/config.rs index f9f9927af2..3e0a2c885f 100644 --- a/crates/buzz-agent/src/config.rs +++ b/crates/buzz-agent/src/config.rs @@ -1309,7 +1309,7 @@ mod tests { ("http://eu.api.openai.com/v1", true), ("http://localhost:11434/v1", false), ("https://openrouter.ai/api/v1", false), - ("https://api.novita.ai/v3/openai", false), + ("https://api.novita.ai/openai", false), ("https://gateway.block.example/v1", false), ("https://api.openai.com.evil.example/v1", false), ("not a url", false),