feat: Add multi-provider LLM support via rig-core adapter (#36)

Add support for OpenAI, Anthropic, Ollama, and OpenAI-compatible
endpoints alongside the existing NEAR AI backend. Users can now
bring their own API keys via environment variables (LLM_BACKEND,
OPENAI_API_KEY, ANTHROPIC_API_KEY, etc.) while NEAR AI remains
the default.

Co-authored-by: Claude Opus 4.6 <[email protected]>
This commit is contained in:
Zaki Manian
2026-02-12 00:37:51 +00:00
committed by GitHub
co-authored by Claude Opus 4.6
parent 45f547c711
commit bb228f6315
9 changed files with 1239 additions and 36 deletions
+1 -1
View File
@@ -1049,7 +1049,7 @@ impl Agent {
iteration += 1;
if iteration > MAX_TOOL_ITERATIONS {
return Err(crate::error::LlmError::InvalidResponse {
provider: "nearai".to_string(),
provider: "agent".to_string(),
reason: format!("Exceeded maximum tool iterations ({})", MAX_TOOL_ITERATIONS),
}
.into());