Spaces:
Running
Running
deploy(S4): Blender headless pipeline + WebAR client + backend fixes
Browse files
backend/agent/react_agent.py
CHANGED
|
@@ -120,15 +120,16 @@ RULES:
|
|
| 120 |
async def _llm_step_stream(self, prompt: str, context: dict) -> AsyncGenerator[ReActStep, None]:
|
| 121 |
t0 = time.time()
|
| 122 |
try:
|
| 123 |
-
provider
|
| 124 |
-
|
| 125 |
-
|
| 126 |
-
|
| 127 |
-
|
| 128 |
-
|
| 129 |
-
|
|
|
|
| 130 |
system_prompt = self._build_system_prompt()
|
| 131 |
-
|
| 132 |
from backend.services.connectors import stream_with_fallback
|
| 133 |
|
| 134 |
raw = ""
|
|
|
|
| 120 |
async def _llm_step_stream(self, prompt: str, context: dict) -> AsyncGenerator[ReActStep, None]:
|
| 121 |
t0 = time.time()
|
| 122 |
try:
|
| 123 |
+
# NOTE: the LLM key/provider are NOT taken from `context` here.
|
| 124 |
+
# stream_with_fallback() below resolves keys itself across the full
|
| 125 |
+
# provider chain (Gemini domain keys → Groq → OpenAI → Anthropic →
|
| 126 |
+
# Mistral → Ollama(PC) → NVIDIA vault) and always yields a response.
|
| 127 |
+
# A previous `context["llm_key"]` pre-check gated this path and
|
| 128 |
+
# bailed with "API Key missing for provider OPENAI" because
|
| 129 |
+
# agent_service never populates llm_key — dropping every desktop
|
| 130 |
+
# reply. Removed; the fallback chain is the single source of truth.
|
| 131 |
system_prompt = self._build_system_prompt()
|
| 132 |
+
|
| 133 |
from backend.services.connectors import stream_with_fallback
|
| 134 |
|
| 135 |
raw = ""
|