fixed the RAg in test pipeline issue

This commit is contained in:
belviskhoremk
2026-04-26 18:51:48 +00:00
parent 205d9d7901
commit 97a501097d
14 changed files with 249 additions and 57 deletions

View File

@@ -31,14 +31,9 @@ class LLMService:
return await self._call_openai(messages, model, max_tokens, temperature)
except Exception as e:
logger.error(f"LLM error ({provider}/{model}): {e}")
# Fallback to a basic model if available
if model != "accounts/fireworks/models/kimi-k2-instruct-0905" and settings.fireworks_api_key:
return await self._call_fireworks(
messages,
"accounts/fireworks/models/kimi-k2-instruct-0905",
max_tokens,
temperature,
)
fallback = "accounts/fireworks/models/llama-v3p3-70b-instruct"
if model != fallback and settings.fireworks_api_key:
return await self._call_fireworks(messages, fallback, max_tokens, temperature)
raise
async def _call_fireworks(