Skip to content

warshanks/owui_anthropic_function

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Anthropic Manifold Pipe for Open WebUI

Version License

This pipe provides seamless integration with Anthropic's Claude models for Open WebUI, enabling advanced capabilities like web search, secure code execution, and extended thinking.

Features

  • Web Search: Enable Claude to search the web for real-time information.
  • Web Fetch: Fetch and process content from specific URLs for deeper analysis.
  • Code Execution: Run Python code in Anthropic's secure sandbox environment for calculations, data analysis, and more.
  • Extended Thinking: Leverage Claude's extended thinking for complex problem-solving. Newer models (Opus 4.8/4.6, Sonnet 4.6) use adaptive thinking (Claude decides when and how much to think); older models use a configurable token budget.
  • Effort Control: Guide how much adaptive-thinking models reason via the EFFORT valve (low, medium, high, xhigh, max). xhigh is available on Opus 4.8.
  • Thinking Display: Adaptive-thinking reasoning defaults to summarized (shown in <think> blocks) via the THINKING_DISPLAY valve; set to omitted for lower latency. This overrides Opus 4.8/4.7's API-level omitted default so it's visible the model thought.
  • Image Processing: Analyze images with support for both URL and base64 inputs (up to 5MB).
  • Streaming Support: Real-time streaming of responses, including thinking blocks and code execution outputs.
  • Cost Tracking: Track and display the cost of requests in real-time.
  • Flexible Configuration: Manage capabilities globally or per-user via Valves.

Supported Models

The pipe automatically handles capabilities for various Claude models, including:

  • Claude Opus (claude-opus-4-8, claude-opus-4-6, claude-opus-4-5-20251101)
  • Claude Sonnet (claude-sonnet-4-6, claude-sonnet-4-5-20250929)
  • Claude Haiku (claude-haiku-4-5-20251001)

Claude Opus 4.8 (claude-opus-4-8) is the flagship model: a 1M-token context window and 128K max output by default, with adaptive thinking as its only thinking mode. See What's new in Claude 4.8.

Configuration

You can configure the pipe using Valves. These can be set globally by the admin or individually by users (if allowed).

Installation

  1. Open your Open WebUI instance.
  2. Go to Admin Panel -> Functions.
  3. Click the + New Function button.
  4. Import the anthropic_manifold.py file or paste its content.
  5. Save and activate the function.

Usage

Extended Thinking

When using a supported model, the model may utilize "thinking" blocks to reason through complex problems before answering. These blocks are displayed as:

<think>
... reasoning process ...
</think>

Note: On budget-based models (e.g. Opus 4.5, Sonnet 4.5), thinking requires a minimum budget of 1,024 tokens and the budget must be less than MAX_TOKENS. On adaptive-thinking models (Opus 4.8/4.6, Sonnet 4.6), the budget is ignored — Claude allocates thinking automatically, optionally guided by the EFFORT valve. On Opus 4.8, adaptive is the only thinking mode (manual budgets are rejected by the API).

Code Execution

If enabled, Claude can write and execute Python code. The code and its output (stdout/stderr) will be displayed in the chat:

print("Hello World")

Output:

Hello World

Web Search

Claude can perform web searches to fetch up-to-date information when enabled via the UI's web search toggle.

Web Fetch

When enabled via the URL context toggle in the UI, Claude can fetch and analyze content from specific URLs. This is useful for reading documentation, analyzing web pages, or extracting information from specific websites.

Uses suurt8ll's gemini_url_context_toggle filter to enable in the UI.

License

MIT License - see the LICENSE file for details.

About

Anthropic Function for OWUI

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Contributors

Languages