Opus 4.5, effort parameter and web_search tool filter#7
Open
nahoj wants to merge 8 commits intochristian-taillon:mainfrom
Open
Opus 4.5, effort parameter and web_search tool filter#7nahoj wants to merge 8 commits intochristian-taillon:mainfrom
nahoj wants to merge 8 commits intochristian-taillon:mainfrom
Conversation
…andling **Phase 0: OpenWebUI Compliance** ✅ - Added __user__ parameter to pipe() method for user tracking/audit trails - Properly typed __event_emitter__ as Optional[Any] - Updated return type to AsyncGenerator[str, None] for precision - Updated _stream_response() signature to accept __event_emitter__ - Enhanced all Valves with comprehensive Field descriptions - Added REQUEST_TIMEOUT valve (configurable, env: ANTHROPIC_REQUEST_TIMEOUT) - Added MODEL_CACHE_TTL valve (configurable, env: ANTHROPIC_MODEL_CACHE_TTL) - Added _models_cache_time tracking for future TTL implementation - Updated docstring with all environment variables **Phase 1: Type Safety & Validation** ✅ - Added complete type hints to all methods - Comprehensive input validation in pipe() method - Enhanced _process_content_item() validation with detailed checks - Added try-except blocks around content processing **Phase 2: Error Handling & Reliability** ✅ - Created _format_error() helper for consistent error formatting - Unified error responses (streaming and non-streaming) - Request ID tracking and logging throughout - Enhanced _normalize_content_blocks() with circular reference detection 🤖 Generated with Claude Code Co-Authored-By: Claude <noreply@anthropic.com>
Owner
|
@nahoj, thanks for pr. Will review this weekend and update hosted app on OpenWebUI Community and reference your profile/commit!
|
0cc67de to
04bf270
Compare
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.
In the pipeline:
I also added a filter to use Anthropic's server-side web search, inspired by https://github.com/owndev/Open-WebUI-Functions/blob/main/filters/google_search_tool.py. It can be taken out of the PR if you don't want it.