Litellm fallback ollama error - #57
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
| GitGuardian id | GitGuardian status | Secret | Commit | Filename | |
|---|---|---|---|---|---|
| 35874985 | Triggered | Generic High Entropy Secret | 22de2ab | extensions/vscode/test/settingsPanel.test.js | View secret |
🛠 Guidelines to remediate hardcoded secrets
- Understand the implications of revoking this secret by investigating where it is used in your code.
- Replace and store your secret safely. Learn here the best practices.
- Revoke and rotate this secret.
- If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.
To avoid such incidents in the future consider
- following these best practices for managing and storing secrets including API keys and other credentials
- install secret detection on pre-commit to catch secret before it leaves your machine and ease remediation.
🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Make the reasoning wrapper something CrewAI will accept
Every query from the web app failed before a token was generated:
Agent.llmis a validated pydantic field typedstr | BaseLLM. Thenormalizer wrapped reasoning models in a plain class, which is neither.
The wrapper's own docstring explains the original choice — CrewAI's LLM
class changes between versions, so composition looked safer than
subclassing — and it was, right up until that field started validating.
After which deepseek-r1, QwQ and every other reasoning model failed at
agent construction on every agent path.
BaseLLM turns out to be an ABC with exactly one abstract method,
call,which is the method this wrapper existed to intercept. So the subclass is
small and satisfies the validator by being what it claims to be. It is
built lazily, on first use: defining it at import would drag CrewAI and
LiteLLM into every process that imports the module, which is the startup
cost llm_provider goes out of its way to avoid.
Three details worth keeping. The inner model's name is carried across,
because CrewAI reads it for logging, token accounting and context-window
sizing. Capability questions are answered by the real client rather than
BaseLLM's defaults, which describe nothing in particular. And a reply that
is only reasoning returns the raw text rather than the empty string it
strips down to — CrewAI reads "" as a failed call.
Verified end to end against the reported setup, Ollama 0.12.9 with
deepseek-r1: agent builds, a real crew run returns, no leakage.
Non-reasoning models are still returned unwrapped and untouched, so the
common path gains neither overhead nor a new way to fail.
The module had no tests, which is how a wrapper incompatible with the
framework it wraps got released. It has 17 now, and three of them fail
against the previous behaviour.