Error with anthropic_manifold_pipeline

Bug Report
Description
Bug Summary:
When using Claude 3.5 via anthropic_manifold_pipeline.py from https://github.com/open-webui/pipelines/blob/main/examples/pipelines/providers/anthropic_manifold_pipeline.py, I get the following error after a while. The API Key is correct.

Steps to Reproduce:
I deployed Pipelines via docker and set up the API Key via the admin interface.

After using Claude 3.5 the pipelines container prints the following error after 2-3 uses.
INFO:     <IP_ADDRESS>:59372 - "GET /models HTTP/1.1" 200 OK
INFO:     <IP_ADDRESS>:57282 - "GET /models HTTP/1.1" 200 OK
INFO:     <IP_ADDRESS>:36000 - "POST /anthropic.claude-3-5-sonnet-20240620/filter/inlet HTTP/1.1" 200 OK
anthropic.claude-3-5-sonnet-20240620
anthropic.claude-3-5-sonnet-20240620
INFO:     <IP_ADDRESS>:36014 - "POST /chat/completions HTTP/1.1" 200 OK
ERROR:    Exception in ASGI application
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/uvicorn/protocols/http/httptools_impl.py", line 435, in run_asgi
    result = await app(  # type: ignore[func-returns-value]
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/uvicorn/middleware/proxy_headers.py", line 78, in __call__
    return await self.app(scope, receive, send)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/fastapi/applications.py", line 1054, in __call__
    await super().__call__(scope, receive, send)
  File "/usr/local/lib/python3.11/site-packages/starlette/applications.py", line 123, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/usr/local/lib/python3.11/site-packages/starlette/middleware/errors.py", line 186, in __call__
    raise exc
  File "/usr/local/lib/python3.11/site-packages/starlette/middleware/errors.py", line 164, in __call__
    await self.app(scope, receive, _send)
  File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 189, in __call__
    with collapse_excgroups():
  File "/usr/local/lib/python3.11/contextlib.py", line 158, in __exit__
    self.gen.throw(typ, value, traceback)
  File "/usr/local/lib/python3.11/site-packages/starlette/_utils.py", line 93, in collapse_excgroups
    raise exc
  File "/usr/local/lib/python3.11/site-packages/starlette/responses.py", line 261, in wrap
    await func()
  File "/usr/local/lib/python3.11/site-packages/starlette/responses.py", line 250, in stream_response
    async for chunk in self.body_iterator:
  File "/usr/local/lib/python3.11/site-packages/starlette/concurrency.py", line 65, in iterate_in_threadpool
    yield await anyio.to_thread.run_sync(_next, as_iterator)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/anyio/to_thread.py", line 56, in run_sync
    return await get_async_backend().run_sync_in_worker_thread(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 2177, in run_sync_in_worker_thread
    return await future
           ^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 859, in run
    result = context.run(func, *args)
             ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/starlette/concurrency.py", line 54, in _next
    return next(iterator)
           ^^^^^^^^^^^^^^
  File "/app/main.py", line 665, in stream_content
    for line in res:
  File "/app/./pipelines/anthropic_manifold_pipeline.py", line 141, in stream_response
    stream = self.client.messages.create(**payload)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/anthropic/_utils/_utils.py", line 277, in wrapper
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/anthropic/resources/messages.py", line 904, in create
    return self._post(
           ^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/anthropic/_base_client.py", line 1266, in post
    return cast(ResponseT, self.request(cast_to, opts, stream=stream, stream_cls=stream_cls))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/anthropic/_base_client.py", line 942, in request
    return self._request(
           ^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/anthropic/_base_client.py", line 1046, in _request
    raise self._make_status_error_from_response(err.response) from None
anthropic.AuthenticationError: Error code: 401 - {'type': 'error', 'error': {'type': 'authentication_error', 'message': 'invalid x-api-key'}}

Environment

Open WebUI Version: [e.g., 0.1.120]
v0.3.10

Operating System: [e.g., Windows 10, macOS Big Sur, Ubuntu 20.04]
Server: Latest Docker, x64
Client: Latest macOS Sonoma, ARM64

Browser (if applicable): [e.g., Chrome 100.0, Firefox 98.0]
Latest Firefox, ARM64

Confirmation:

[X] I have read and followed all the instructions provided in the README.md.
[X] I am on the latest version of both Open WebUI and Ollama.
[X] I have included the browser console logs.
[X] I have included the Docker container logs.

We often experience the same thing.

I'll have a look when I've got time, but I've been mostly using my Anthropic Function nowadays. I haven't noticed this issue in that, but then it's just using requests and not using the anthropic library actually, so there could be differences there.

Any solution yet? Today I have the same problem.
RESET_PIPELINES_DIR is not set to true. No action taken.
PIPELINES_REQUIREMENTS_PATH not specified. Skipping installation of requirements.
PIPELINES_URLS not specified. Skipping pipelines download and installation.
INFO:     Started server process [7]
INFO:     Waiting for application startup.
INFO:     Application startup complete.
INFO:     Uvicorn running on http://<IP_ADDRESS>:9099 (Press CTRL+C to quit)
Loaded module: anthropic_manifold_pipeline
Loaded module: openai_dalle_manifold_pipeline
on_startup:anthropic_manifold_pipeline
on_startup:openai_dalle_manifold_pipeline
INFO:     <IP_ADDRESS>:52276 - "GET /models HTTP/1.1" 200 OK
RESET_PIPELINES_DIR is not set to true. No action taken.
PIPELINES_REQUIREMENTS_PATH not specified. Skipping installation of requirements.
PIPELINES_URLS not specified. Skipping pipelines download and installation.
INFO:     Started server process [7]
INFO:     Waiting for application startup.
INFO:     Application startup complete.
INFO:     Uvicorn running on http://<IP_ADDRESS>:9099 (Press CTRL+C to quit)
Loaded module: anthropic_manifold_pipeline
Loaded module: openai_dalle_manifold_pipeline
on_startup:anthropic_manifold_pipeline
on_startup:openai_dalle_manifold_pipeline
INFO:     <IP_ADDRESS>:59008 - "GET /models HTTP/1.1" 200 OK
INFO:     <IP_ADDRESS>:60898 - "GET /models HTTP/1.1" 200 OK
INFO:     <IP_ADDRESS>:60940 - "GET /models HTTP/1.1" 200 OK
INFO:     <IP_ADDRESS>:51132 - "POST /anthropic.claude-3-5-sonnet-20240620/filter/inlet HTTP/1.1" 200 OK
anthropic.claude-3-5-sonnet-20240620
anthropic.claude-3-5-sonnet-20240620
INFO:     <IP_ADDRESS>:51134 - "POST /chat/completions HTTP/1.1" 200 OK
ERROR:    Exception in ASGI application
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/uvicorn/protocols/http/httptools_impl.py", line 435, in run_asgi
    result = await app(  # type: ignore[func-returns-value]
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/uvicorn/middleware/proxy_headers.py", line 78, in __call__
    return await self.app(scope, receive, send)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/fastapi/applications.py", line 1054, in __call__
    await super().__call__(scope, receive, send)
  File "/usr/local/lib/python3.11/site-packages/starlette/applications.py", line 123, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/usr/local/lib/python3.11/site-packages/starlette/middleware/errors.py", line 186, in __call__
    raise exc
  File "/usr/local/lib/python3.11/site-packages/starlette/middleware/errors.py", line 164, in __call__
    await self.app(scope, receive, _send)
  File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 189, in __call__
    with collapse_excgroups():
  File "/usr/local/lib/python3.11/contextlib.py", line 158, in __exit__
    self.gen.throw(typ, value, traceback)
  File "/usr/local/lib/python3.11/site-packages/starlette/_utils.py", line 93, in collapse_excgroups
    raise exc
  File "/usr/local/lib/python3.11/site-packages/starlette/responses.py", line 261, in wrap
    await func()
  File "/usr/local/lib/python3.11/site-packages/starlette/responses.py", line 250, in stream_response
    async for chunk in self.body_iterator:
  File "/usr/local/lib/python3.11/site-packages/starlette/concurrency.py", line 65, in iterate_in_threadpool
    yield await anyio.to_thread.run_sync(_next, as_iterator)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/anyio/to_thread.py", line 56, in run_sync
    return await get_async_backend().run_sync_in_worker_thread(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 2177, in run_sync_in_worker_thread
    return await future
           ^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 859, in run
    result = context.run(func, *args)
             ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/starlette/concurrency.py", line 54, in _next
    return next(iterator)
           ^^^^^^^^^^^^^^
  File "/app/main.py", line 665, in stream_content
    for line in res:
  File "/app/./pipelines/anthropic_manifold_pipeline.py", line 141, in stream_response
    stream = self.client.messages.create(**payload)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/anthropic/_utils/_utils.py", line 277, in wrapper
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/anthropic/resources/messages.py", line 904, in create
    return self._post(
           ^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/anthropic/_base_client.py", line 1266, in post
    return cast(ResponseT, self.request(cast_to, opts, stream=stream, stream_cls=stream_cls))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/anthropic/_base_client.py", line 942, in request
    return self._request(
           ^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/anthropic/_base_client.py", line 1046, in _request
    raise self._make_status_error_from_response(err.response) from None
anthropic.AuthenticationError: Error code: 401 - {'type': 'error', 'error': {'type': 'authentication_error', 'message': 'invalid x-api-key'}}
INFO:     <IP_ADDRESS>:52738 - "POST /anthropic.claude-3-5-sonnet-20240620/filter/inlet HTTP/1.1" 200 OK
anthropic.claude-3-5-sonnet-20240620
anthropic.claude-3-5-sonnet-20240620
INFO:     <IP_ADDRESS>:52740 - "POST /chat/completions HTTP/1.1" 200 OK
ERROR:    Exception in ASGI application
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/uvicorn/protocols/http/httptools_impl.py", line 435, in run_asgi
    result = await app(  # type: ignore[func-returns-value]
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/uvicorn/middleware/proxy_headers.py", line 78, in __call__
    return await self.app(scope, receive, send)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/fastapi/applications.py", line 1054, in __call__
    await super().__call__(scope, receive, send)
  File "/usr/local/lib/python3.11/site-packages/starlette/applications.py", line 123, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/usr/local/lib/python3.11/site-packages/starlette/middleware/errors.py", line 186, in __call__
    raise exc
  File "/usr/local/lib/python3.11/site-packages/starlette/middleware/errors.py", line 164, in __call__
    await self.app(scope, receive, _send)
  File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 189, in __call__
    with collapse_excgroups():
  File "/usr/local/lib/python3.11/contextlib.py", line 158, in __exit__
    self.gen.throw(typ, value, traceback)
  File "/usr/local/lib/python3.11/site-packages/starlette/_utils.py", line 93, in collapse_excgroups
    raise exc
  File "/usr/local/lib/python3.11/site-packages/starlette/responses.py", line 261, in wrap
    await func()
  File "/usr/local/lib/python3.11/site-packages/starlette/responses.py", line 250, in stream_response
    async for chunk in self.body_iterator:
  File "/usr/local/lib/python3.11/site-packages/starlette/concurrency.py", line 65, in iterate_in_threadpool
    yield await anyio.to_thread.run_sync(_next, as_iterator)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/anyio/to_thread.py", line 56, in run_sync
    return await get_async_backend().run_sync_in_worker_thread(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 2177, in run_sync_in_worker_thread
    return await future
           ^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 859, in run
    result = context.run(func, *args)
             ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/starlette/concurrency.py", line 54, in _next
    return next(iterator)
           ^^^^^^^^^^^^^^
  File "/app/main.py", line 665, in stream_content
    for line in res:
  File "/app/./pipelines/anthropic_manifold_pipeline.py", line 141, in stream_response
    stream = self.client.messages.create(**payload)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/anthropic/_utils/_utils.py", line 277, in wrapper
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/anthropic/resources/messages.py", line 904, in create
    return self._post(
           ^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/anthropic/_base_client.py", line 1266, in post
    return cast(ResponseT, self.request(cast_to, opts, stream=stream, stream_cls=stream_cls))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/anthropic/_base_client.py", line 942, in request
    return self._request(
           ^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/anthropic/_base_client.py", line 1046, in _request
    raise self._make_status_error_from_response(err.response) from None
anthropic.AuthenticationError: Error code: 401 - {'type': 'error', 'error': {'type': 'authentication_error', 'message': 'invalid x-api-key'}}

401 Authentication error. Have you checked your keys work if you do a request manually with cURL?

The API Key is correct.

See my initial post.

Your logs are either at odds with the reality, or your key is bad. You didn't answer the question of whether you've tried that key with anything else.
If I deliberately set an incorrect key I get this error, same as you:
ERROR:    Exception in ASGI application
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/uvicorn/protocols/http/httptools_impl.py", line 435, in run_asgi
    result = await app(  # type: ignore[func-returns-value]
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/uvicorn/middleware/proxy_headers.py", line 78, in __call__
    return await self.app(scope, receive, send)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/fastapi/applications.py", line 1054, in __call__
    await super().__call__(scope, receive, send)
  File "/usr/local/lib/python3.11/site-packages/starlette/applications.py", line 123, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/usr/local/lib/python3.11/site-packages/starlette/middleware/errors.py", line 186, in __call__
    raise exc
  File "/usr/local/lib/python3.11/site-packages/starlette/middleware/errors.py", line 164, in __call__
    await self.app(scope, receive, _send)
  File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 189, in __call__
    with collapse_excgroups():
  File "/usr/local/lib/python3.11/contextlib.py", line 158, in __exit__
    self.gen.throw(typ, value, traceback)
  File "/usr/local/lib/python3.11/site-packages/starlette/_utils.py", line 93, in collapse_excgroups
    raise exc
  File "/usr/local/lib/python3.11/site-packages/starlette/responses.py", line 261, in wrap
    await func()
  File "/usr/local/lib/python3.11/site-packages/starlette/responses.py", line 250, in stream_response
    async for chunk in self.body_iterator:
  File "/usr/local/lib/python3.11/site-packages/starlette/concurrency.py", line 65, in iterate_in_threadpool
    yield await anyio.to_thread.run_sync(_next, as_iterator)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/anyio/to_thread.py", line 56, in run_sync
    return await get_async_backend().run_sync_in_worker_thread(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 2177, in run_sync_in_worker_thread
    return await future
           ^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 859, in run
    result = context.run(func, *args)
             ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/starlette/concurrency.py", line 54, in _next
    return next(iterator)
           ^^^^^^^^^^^^^^
  File "/app/main.py", line 665, in stream_content
    for line in res:
  File "/app/./pipelines/anthropic_manifold_pipeline.py", line 141, in stream_response
    stream = self.client.messages.create(**payload)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/anthropic/_utils/_utils.py", line 277, in wrapper
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/anthropic/resources/messages.py", line 904, in create
    return self._post(
           ^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/anthropic/_base_client.py", line 1266, in post
    return cast(ResponseT, self.request(cast_to, opts, stream=stream, stream_cls=stream_cls))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/anthropic/_base_client.py", line 942, in request
    return self._request(
           ^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/anthropic/_base_client.py", line 1046, in _request
    raise self._make_status_error_from_response(err.response) from None
anthropic.AuthenticationError: Error code: 401 - {'type': 'error', 'error': {'type': 'authentication_error', 'message': 'invalid x-api-key'}}

Your logs are either at odds with the reality, or your key is bad. You didn't answer the question of whether you've tried that key with anything else. You're certain your account is in good-standing, and adequately funded ($5 minimum balance required IIRC)?

25$ Balance
Here is the cURL Example with output
curl https://api.anthropic.com/v1/messages --header "x-api-key: MYAPIKEY" --header "anthropic-version: 2023-06-01" --header "content-type: application/json" --data '{"model": "claude-3-5-sonnet-20240620", "max_tokens": 1024, "messages": [{"role": "user", "content": "Hello, world"}]}'
{"id":"msg_018VV4ca8WAiR8iTgSfMcx3d","type":"message","role":"assistant","model":"claude-3-5-sonnet-20240620","content":[{"type":"text","text":"Hello! How can I assist you today? Is there anything specific you'd like to talk about or any questions you have?"}],"stop_reason":"end_turn","stop_sequence":null,"usage":{"input_tokens":10,"output_tokens":28}}

Well, I'm truly at a loss then, I've been unable to reproduce this by any easy means, and I don't wish to push the issue too much further for fear of affecting my own access to their API.

If I create a second API key and use it, it works. The first API key, however, functions flawlessly via cURL.

Strange... is it possible they're using a weird character in your first key that isn't being escaped properly?

Sometimes it's working with the key and after some time the same key won't work anymore.

I occasionally see the same issue with a working key. Seems reproducible when I restart the pipelines container. If I go into Open WebUI/Pipelines and select the anthropic_manifold_pipeline (manifold), the saved API key loads up. After pressing save without changing anything, it starts working as it should. The mounted appdata folder appears to have the correct file/folder permissions and ownership.

Now there's a clue I can work on. Thanks @realies, I'll see if this new information uncovers anything.

I am also experiencing this same error. With curl, the key works fine before I use it with Pipelines, but after I use it in Open WebUI, like a banshee, the key is marked for death (figuratively speaking) and will unceremoniously expire in >24 hours. After this not even curl will work with that key. I have made dozens of new keys trying to get around this issue and I have not been banned from the API or anything, but my keys are dropping like flies.
This is the error that happens after a key has been cursed:
{
  "type": "error",
  "error": {
    "type": "authentication_error",
    "message": "invalid x-api-key"
  }
}

If you're paying customers, have any of you tried contacting Anthropic's support to inquire as to the reason your keys are being revoked?

I have, and Anthropic took the entirety of the month to respond (Thanks, Claude 3.5). Today, they're asking for what the header sent from the app looks like and I don't really know how to find that out.

Thanks for the additional datapoint @Digit404. I've no intention of closing this until I figure out what the heck is going on 😅

While this issue is being looked at, for anyone who wants to temporarily bypass this problem can use the following working anthropic pipeline which uses the HTTP API directly and is currently working without any errors (no invalid x-api-key error):
"""
title: Anthropic Manifold HTTP Pipeline
author: sriparashiva
date: 2024-07-27
version: 1.0
license: MIT
description: A pipeline for generating text and processing images using the Anthropic HTTP API.
requirements: requests, sseclient-py
environment_variables: ANTHROPIC_API_KEY
"""

import os

from typing import List, Union, Generator, Iterator
from pydantic import BaseModel
import requests

from utils.pipelines.main import pop_system_message

import requests
import sseclient
from typing import Generator
import json

class Pipeline:
    class Valves(BaseModel):
        ANTHROPIC_API_KEY: str = ""

    def __init__(self):
        self.type = "manifold"
        self.id = "anthropic"
        self.name = "anthropic/"

        self.valves = self.Valves(
            **{"ANTHROPIC_API_KEY": os.getenv("ANTHROPIC_API_KEY", "your-api-key-here")}
        )
        self.api_key = self.valves.ANTHROPIC_API_KEY
        self.url = 'https://api.anthropic.com/v1/messages'
        self.headers = {
            'anthropic-version': '2023-06-01',
            'content-type': 'application/json',
            'x-api-key': self.api_key
        }

    def get_anthropic_models(self):
        return [
            {"id": "claude-3-haiku-20240307", "name": "claude-3-haiku"},
            {"id": "claude-3-opus-20240229", "name": "claude-3-opus"},
            {"id": "claude-3-sonnet-20240229", "name": "claude-3-sonnet"},
            {"id": "claude-3-5-sonnet-20240620", "name": "claude-3.5-sonnet"},
        ]

    async def on_startup(self):
        print(f"on_startup:{__name__}")
        pass

    async def on_shutdown(self):
        print(f"on_shutdown:{__name__}")
        pass

    async def on_valves_updated(self):
        self.api_key = self.valves.ANTHROPIC_API_KEY
        self.headers = {
                    'anthropic-version': '2023-06-01',
                    'content-type': 'application/json',
                    'x-api-key': self.api_key
                }
        pass

    def pipelines(self) -> List[dict]:
        return self.get_anthropic_models()

    def process_image(self, image_data):
        if image_data["url"].startswith("data:image"):
            mime_type, base64_data = image_data["url"].split(",", 1)
            media_type = mime_type.split(":")[1].split(";")[0]
            return {
                "type": "image",
                "source": {
                    "type": "base64",
                    "media_type": media_type,
                    "data": base64_data,
                },
            }
        else:
            return {
                "type": "image",
                "source": {"type": "url", "url": image_data["url"]},
            }

    def pipe(
        self, user_message: str, model_id: str, messages: List[dict], body: dict
    ) -> Union[str, Generator, Iterator]:
        try:
            # Remove unnecessary keys
            for key in ['user', 'chat_id', 'title']:
                body.pop(key, None)

            system_message, messages = pop_system_message(messages)

            processed_messages = []
            image_count = 0
            total_image_size = 0

            for message in messages:
                processed_content = []
                if isinstance(message.get("content"), list):
                    for item in message["content"]:
                        if item["type"] == "text":
                            processed_content.append({"type": "text", "text": item["text"]})
                        elif item["type"] == "image_url":
                            if image_count >= 5:
                                raise ValueError("Maximum of 5 images per API call exceeded")

                            processed_image = self.process_image(item["image_url"])
                            processed_content.append(processed_image)

                            if processed_image["source"]["type"] == "base64":
                                image_size = len(processed_image["source"]["data"]) * 3 / 4
                            else:
                                image_size = 0

                            total_image_size += image_size
                            if total_image_size > 100 * 1024 * 1024:
                                raise ValueError("Total size of images exceeds 100 MB limit")

                            image_count += 1
                else:
                    processed_content = [{"type": "text", "text": message.get("content", "")}]

                processed_messages.append({"role": message["role"], "content": processed_content})

            # Prepare the payload
            payload = {
                "model": model_id,
                "messages": processed_messages,
                "max_tokens": body.get("max_tokens", 4096),
                "temperature": body.get("temperature", 0.8),
                "top_k": body.get("top_k", 40),
                "top_p": body.get("top_p", 0.9),
                "stop_sequences": body.get("stop", []),
                **({"system": str(system_message)} if system_message else {}),
                "stream": body.get("stream", False),
            }

            if body.get("stream", False):
                return self.stream_response(model_id, payload)
            else:
                return self.get_completion(model_id, payload)
        except Exception as e:
            return f"Error: {e}"

    def stream_response(self, model_id: str, payload: dict) -> Generator:
        response = requests.post(self.url, headers=self.headers, json=payload, stream=True)

        if response.status_code == 200:
            client = sseclient.SSEClient(response)
            for event in client.events():
                event_data = event.data
                try:
                    event_json = json.loads(event_data)
                    if event_json['type'] == "content_block_start":
                        yield event_json['content_block']['text']
                    elif event_json['type'] == "content_block_delta":
                        yield event_json['delta']['text']
                except ValueError:
                    # Handle any JSON decoding errors if necessary
                    print(f"Unable to decode JSON: {event_data}")
                    raise ValueError
        else:
            raise Exception(f"Error: {response.status_code} - {response.text}")

    def get_completion(self, model_id: str, payload: dict) -> str:
        response = requests.post(self.url, headers=self.headers, json=payload)
        if response.status_code == 200:
            response_json = response.json()
            # Assuming we're interested in the first text content block.
            return response_json['content'][0]['text']
        else:
            raise Exception(f"Error: {response.status_code} - {response.text}")

@sriparashiva ironically that's exactly what I was planning to do to "resolve" this if I had to, since using requests has been working just fine on my Function version of this: https://openwebui.com/f/justinrahb/anthropic

While this issue is being looked at, anyone who wants to temporarily bypass this problem can use the following working anthropic pipeline which uses the HTTP API directly and is currently working without any errors (no invalid x-api-key error.

Hi, tahnk you. I have downloaded your script and uploaded it through the OpenWebUI interface. Afterwards, the file is immediately moved to the "failed" subfolder within the pipeline folder. In the pipeline docker Logs, I see the following:
WARNING:root:No Pipeline class found in Anthropic
Error loading module: Anthropic
No module named 'sseclient'

@dannykorpan Since the pipeline has an additional dependency sseclient, you need to install it manually on the pipelines python environment. This currently needs to be done manually (I couldn't find any existing documentation showing how to have the dependencies of a custom pipeline auto-installed).
I am using a Docker setup for pipelines, so I just executed the command pip3 install sseclient-py inside the pipelines docker container. That should make it work.
Or alternatively, you can use the code snippet from @justinh-rahb's linked custom function which does not use any external dependencies.

@dannykorpan Since the pipeline has an additional dependency sseclient, you need to install it manually on the pipelines python environment. This currently needs to be done manually (I couldn't find any existing documentation showing how to have the dependencies of a custom pipeline auto-installed).
I am using a Docker setup for pipelines, so I just executed the command pip3 install sseclient-py inside the pipelines docker container. That should make it work.
Or alternatively, you can use the code snippet from @justinh-rahb's linked custom function which does not use any external dependencies.

Your workaround works :-) Thank you!

@dannykorpan @Digit404 @sriparashiva please give this PR a try:

#179

Thank you, but still get the following error after importing into pipelines:
WARNING:root:No Pipeline class found in anthropic_manifold_pipeline
https://raw.githubusercontent.com/justinh-rahb/open-webui-pipelines/anthropic-fix/examples/pipelines/providers/anthropic_manifold_pipeline.py
Error loading module: anthropic_manifold_pipeline
No module named 'sseclient'

Thank you, but still get the following error after importing into pipelines:
WARNING:root:No Pipeline class found in anthropic_manifold_pipeline
https://raw.githubusercontent.com/justinh-rahb/open-webui-pipelines/anthropic-fix/examples/pipelines/providers/anthropic_manifold_pipeline.py
Error loading module: anthropic_manifold_pipeline
No module named 'sseclient'

As noted, the dependency only installs on server startup, if you attempt to upload the pipeline from Admin Settings > Pipelines, you'll get such an error.

Thank you, but I think it represents a potential source of error.
If I restart the server, the sseclient module still won't be installed automatically. I always have to install it manually, even after a restart. Or am I misunderstanding something?

 The frontmatter at the top of the file specifies what depends it uses:

requirements: requests, sseclient-py

When the server is started (or restarted) with start.sh, it loops through all of the installed pipelines and will pip install their requirements:
https://github.com/open-webui/pipelines/blob/cd6c092a531f886810f2789066a628907e1d2478/start.sh#L85-L105

But I start the pipelines server via docker.

But I start the pipelines server via docker.

After installing the new pipeline, it's been a while and my key still works. Thanks for the fix!

@justinh-rahb, for some reason I still have to re-submit API keys for each pipeline for the service to continue to work after a restart; this is the compose file:
$ cat docker-compose.yml
services:
  pipelines:
    image: ghcr.io/open-webui/pipelines:main
    container_name: pipelines
    volumes:
      - ./data:/app/pipelines
    environment:
      - PIPELINES_URLS=https://raw.githubusercontent.com/open-webui/pipelines/main/examples/pipelines/providers/anthropic_manifold_pipeline.py;https://raw.githubusercontent.com/open-webui/pipelines/main/examples/pipelines/providers/openai_manifold_pipeline.py;https://raw.githubusercontent.com/open-webui/pipelines/main/examples/pipelines/providers/ollama_manifold_pipeline.py
    restart: unless-stopped

here's a log of starting the container, trying to use anthropic and failing to do so because
pipelines  | Exception: Error: 401 - {"type":"error","error":{"type":"authentication_error","message":"invalid x-api-key"}}
going to the settings page for anthropic_manifold_pipeline and pressing save can be seen to fix it further down the logs

any idea why this is happening?
realies@rpi-1:~/compose/pipelines $ docker compose up -d && docker compose logs -f
[+] Running 1/1
 ✔ Container pipelines  Started                                                                                0.4s
pipelines  | RESET_PIPELINES_DIR is not set to true. No action taken.
pipelines  | PIPELINES_REQUIREMENTS_PATH not specified. Skipping installation of requirements.
pipelines  | Downloading pipeline files from https://raw.githubusercontent.com/open-webui/pipelines/main/examples/pipelines/providers/anthropic_manifold_pipeline.py to ./pipelines...
pipelines  |   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
pipelines  |                                  Dload  Upload   Total   Spent    Left  Speed
100  6523  100  6523    0     0  36722      0 --:--:-- --:--:-- --:--:-- 36853
pipelines  | Downloading pipeline files from https://raw.githubusercontent.com/open-webui/pipelines/main/examples/pipelines/providers/openai_manifold_pipeline.py to ./pipelines...
pipelines  |   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
pipelines  |                                  Dload  Upload   Total   Spent    Left  Speed
100  3917  100  3917    0     0  36027      0 --:--:-- --:--:-- --:--:-- 36268
pipelines  | Downloading pipeline files from https://raw.githubusercontent.com/open-webui/pipelines/main/examples/pipelines/providers/ollama_manifold_pipeline.py to ./pipelines...
pipelines  |   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
pipelines  |                                  Dload  Upload   Total   Spent    Left  Speed
100  3488  100  3488    0     0  28807      0 --:--:-- --:--:-- --:--:-- 29066
pipelines  | pip install requests  sseclient-py
pipelines  | Requirement already satisfied: requests in /usr/local/lib/python3.11/site-packages (2.32.2)
pipelines  | Collecting sseclient-py
pipelines  |   Downloading sseclient_py-1.8.0-py2.py3-none-any.whl.metadata (2.0 kB)
pipelines  | Requirement already satisfied: charset-normalizer<4,>=2 in /usr/local/lib/python3.11/site-packages (from requests) (3.3.2)
pipelines  | Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.11/site-packages (from requests) (3.7)
pipelines  | Requirement already satisfied: urllib3<3,>=1.21.1 in /usr/local/lib/python3.11/site-packages (from requests) (2.2.2)
pipelines  | Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.11/site-packages (from requests) (2024.7.4)
pipelines  | Downloading sseclient_py-1.8.0-py2.py3-none-any.whl (8.8 kB)
pipelines  | Installing collected packages: sseclient-py
pipelines  | Successfully installed sseclient-py-1.8.0
pipelines  | WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
pipelines  |
pipelines  | [notice] A new release of pip is available: 24.0 -> 24.2
pipelines  | [notice] To update, run: pip install --upgrade pip
pipelines  | No requirements found in frontmatter of ./pipelines/ollama_manifold_pipeline.py.
pipelines  | No requirements found in frontmatter of ./pipelines/openai_manifold_pipeline.py.
pipelines  | INFO:     Started server process [55]
pipelines  | INFO:     Waiting for application startup.
pipelines  | INFO:     Application startup complete.
pipelines  | INFO:     Uvicorn running on http://<IP_ADDRESS>:9099 (Press CTRL+C to quit)
pipelines  | Loaded module: anthropic_manifold_pipeline
pipelines  | Loaded module: openai_manifold_pipeline
pipelines  | Error: 'data'
pipelines  | Loaded module: ollama_manifold_pipeline
pipelines  | on_startup:anthropic_manifold_pipeline
pipelines  | on_startup:openai_manifold_pipeline
pipelines  | on_startup:ollama_manifold_pipeline
pipelines  | INFO:     <IP_ADDRESS>:38112 - "GET /models HTTP/1.1" 200 OK
pipelines  | INFO:     <IP_ADDRESS>:55694 - "POST /anthropic.claude-3-5-sonnet-20240620/filter/inlet HTTP/1.1" 200 OK
pipelines  | anthropic.claude-3-5-sonnet-20240620
pipelines  | anthropic.claude-3-5-sonnet-20240620
pipelines  | INFO:     <IP_ADDRESS>:55706 - "POST /chat/completions HTTP/1.1" 200 OK
pipelines  | ERROR:    Exception in ASGI application
pipelines  |   + Exception Group Traceback (most recent call last):
pipelines  |   |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 192, in __call__
pipelines  |   |     await response(scope, wrapped_receive, send)
pipelines  |   |   File "/usr/local/lib/python3.11/site-packages/starlette/responses.py", line 258, in __call__
pipelines  |   |     async with anyio.create_task_group() as task_group:
pipelines  |   |   File "/usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 680, in __aexit__
pipelines  |   |     raise BaseExceptionGroup(
pipelines  |   | ExceptionGroup: unhandled errors in a TaskGroup (1 sub-exception)
pipelines  |   +-+---------------- 1 ----------------
pipelines  |     | Exception Group Traceback (most recent call last):
pipelines  |     |   File "/usr/local/lib/python3.11/site-packages/starlette/responses.py", line 261, in wrap
pipelines  |     |     await func()
pipelines  |     |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 217, in stream_response
pipelines  |     |     return await super().stream_response(send)
pipelines  |     |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
pipelines  |     |   File "/usr/local/lib/python3.11/site-packages/starlette/responses.py", line 250, in stream_response
pipelines  |     |     async for chunk in self.body_iterator:
pipelines  |     |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 181, in body_stream
pipelines  |     |     raise app_exc
pipelines  |     |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 151, in coro
pipelines  |     |     await self.app(scope, receive_or_disconnect, send_no_error)
pipelines  |     |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/cors.py", line 85, in __call__
pipelines  |     |     await self.app(scope, receive, send)
pipelines  |     |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 65, in __call__
pipelines  |     |     await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
pipelines  |     |   File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
pipelines  |     |     raise exc
pipelines  |     |   File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
pipelines  |     |     await app(scope, receive, sender)
pipelines  |     |   File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 756, in __call__
pipelines  |     |     await self.middleware_stack(scope, receive, send)
pipelines  |     |   File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 776, in app
pipelines  |     |     await route.handle(scope, receive, send)
pipelines  |     |   File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 297, in handle
pipelines  |     |     await self.app(scope, receive, send)
pipelines  |     |   File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 77, in app
pipelines  |     |     await wrap_app_handling_exceptions(app, request)(scope, receive, send)
pipelines  |     |   File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
pipelines  |     |     raise exc
pipelines  |     |   File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
pipelines  |     |     await app(scope, receive, sender)
pipelines  |     |   File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 75, in app
pipelines  |     |     await response(scope, receive, send)
pipelines  |     |   File "/usr/local/lib/python3.11/site-packages/starlette/responses.py", line 258, in __call__
pipelines  |     |     async with anyio.create_task_group() as task_group:
pipelines  |     |   File "/usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 680, in __aexit__
pipelines  |     |     raise BaseExceptionGroup(
pipelines  |     | ExceptionGroup: unhandled errors in a TaskGroup (1 sub-exception)
pipelines  |     +-+---------------- 1 ----------------
pipelines  |       | Traceback (most recent call last):
pipelines  |       |   File "/usr/local/lib/python3.11/site-packages/uvicorn/protocols/http/httptools_impl.py", line 435, in run_asgi
pipelines  |       |     result = await app(  # type: ignore[func-returns-value]
pipelines  |       |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
pipelines  |       |   File "/usr/local/lib/python3.11/site-packages/uvicorn/middleware/proxy_headers.py", line 78, in __call__
pipelines  |       |     return await self.app(scope, receive, send)
pipelines  |       |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
pipelines  |       |   File "/usr/local/lib/python3.11/site-packages/fastapi/applications.py", line 1054, in __call__
pipelines  |       |     await super().__call__(scope, receive, send)
pipelines  |       |   File "/usr/local/lib/python3.11/site-packages/starlette/applications.py", line 123, in __call__
pipelines  |       |     await self.middleware_stack(scope, receive, send)
pipelines  |       |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/errors.py", line 186, in __call__
pipelines  |       |     raise exc
pipelines  |       |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/errors.py", line 164, in __call__
pipelines  |       |     await self.app(scope, receive, _send)
pipelines  |       |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 189, in __call__
pipelines  |       |     with collapse_excgroups():
pipelines  |       |   File "/usr/local/lib/python3.11/contextlib.py", line 158, in __exit__
pipelines  |       |     self.gen.throw(typ, value, traceback)
pipelines  |       |   File "/usr/local/lib/python3.11/site-packages/starlette/_utils.py", line 93, in collapse_excgroups
pipelines  |       |     raise exc
pipelines  |       |   File "/usr/local/lib/python3.11/site-packages/starlette/responses.py", line 261, in wrap
pipelines  |       |     await func()
pipelines  |       |   File "/usr/local/lib/python3.11/site-packages/starlette/responses.py", line 250, in stream_response
pipelines  |       |     async for chunk in self.body_iterator:
pipelines  |       |   File "/usr/local/lib/python3.11/site-packages/starlette/concurrency.py", line 65, in iterate_in_threadpool
pipelines  |       |     yield await anyio.to_thread.run_sync(_next, as_iterator)
pipelines  |       |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
pipelines  |       |   File "/usr/local/lib/python3.11/site-packages/anyio/to_thread.py", line 56, in run_sync
pipelines  |       |     return await get_async_backend().run_sync_in_worker_thread(
pipelines  |       |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
pipelines  |       |   File "/usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 2177, in run_sync_in_worker_thread
pipelines  |       |     return await future
pipelines  |       |            ^^^^^^^^^^^^
pipelines  |       |   File "/usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 859, in run
pipelines  |       |     result = context.run(func, *args)
pipelines  |       |              ^^^^^^^^^^^^^^^^^^^^^^^^
pipelines  |       |   File "/usr/local/lib/python3.11/site-packages/starlette/concurrency.py", line 54, in _next
pipelines  |       |     return next(iterator)
pipelines  |       |            ^^^^^^^^^^^^^^
pipelines  |       |   File "/app/main.py", line 665, in stream_content
pipelines  |       |     for line in res:
pipelines  |       |   File "/app/./pipelines/anthropic_manifold_pipeline.py", line 166, in stream_response
pipelines  |       |     raise Exception(f"Error: {response.status_code} - {response.text}")
pipelines  |       | Exception: Error: 401 - {"type":"error","error":{"type":"authentication_error","message":"invalid x-api-key"}}
pipelines  |       +------------------------------------
pipelines  |
pipelines  | During handling of the above exception, another exception occurred:
pipelines  |
pipelines  |   + Exception Group Traceback (most recent call last):
pipelines  |   |   File "/usr/local/lib/python3.11/site-packages/starlette/_utils.py", line 87, in collapse_excgroups
pipelines  |   |     yield
pipelines  |   |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 190, in __call__
pipelines  |   |     async with anyio.create_task_group() as task_group:
pipelines  |   |   File "/usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 680, in __aexit__
pipelines  |   |     raise BaseExceptionGroup(
pipelines  |   | ExceptionGroup: unhandled errors in a TaskGroup (1 sub-exception)
pipelines  |   +-+---------------- 1 ----------------
pipelines  |     | Traceback (most recent call last):
pipelines  |     |   File "/usr/local/lib/python3.11/site-packages/starlette/responses.py", line 265, in __call__
pipelines  |     |     await wrap(partial(self.listen_for_disconnect, receive))
pipelines  |     |   File "/usr/local/lib/python3.11/site-packages/starlette/responses.py", line 261, in wrap
pipelines  |     |     await func()
pipelines  |     |   File "/usr/local/lib/python3.11/site-packages/starlette/responses.py", line 238, in listen_for_disconnect
pipelines  |     |     message = await receive()
pipelines  |     |               ^^^^^^^^^^^^^^^
pipelines  |     |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 54, in wrapped_receive
pipelines  |     |     msg = await self.receive()
pipelines  |     |           ^^^^^^^^^^^^^^^^^^^^
pipelines  |     |   File "/usr/local/lib/python3.11/site-packages/uvicorn/protocols/http/httptools_impl.py", line 596, in receive
pipelines  |     |     await self.message_event.wait()
pipelines  |     |   File "/usr/local/lib/python3.11/asyncio/locks.py", line 213, in wait
pipelines  |     |     await fut
pipelines  |     | asyncio.exceptions.CancelledError: Cancelled by cancel scope 7f957d9cd0
pipelines  |     |
pipelines  |     | During handling of the above exception, another exception occurred:
pipelines  |     |
pipelines  |     | Exception Group Traceback (most recent call last):
pipelines  |     |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 192, in __call__
pipelines  |     |     await response(scope, wrapped_receive, send)
pipelines  |     |   File "/usr/local/lib/python3.11/site-packages/starlette/responses.py", line 258, in __call__
pipelines  |     |     async with anyio.create_task_group() as task_group:
pipelines  |     |   File "/usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 680, in __aexit__
pipelines  |     |     raise BaseExceptionGroup(
pipelines  |     | ExceptionGroup: unhandled errors in a TaskGroup (1 sub-exception)
pipelines  |     +-+---------------- 1 ----------------
pipelines  |       | Traceback (most recent call last):
pipelines  |       |   File "/usr/local/lib/python3.11/site-packages/starlette/responses.py", line 265, in __call__
pipelines  |       |     await wrap(partial(self.listen_for_disconnect, receive))
pipelines  |       |   File "/usr/local/lib/python3.11/site-packages/starlette/responses.py", line 261, in wrap
pipelines  |       |     await func()
pipelines  |       |   File "/usr/local/lib/python3.11/site-packages/starlette/responses.py", line 238, in listen_for_disconnect
pipelines  |       |     message = await receive()
pipelines  |       |               ^^^^^^^^^^^^^^^
pipelines  |       |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 128, in receive_or_disconnect
pipelines  |       |     message = await wrap(wrapped_receive)
pipelines  |       |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^
pipelines  |       |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 123, in wrap
pipelines  |       |     result = await func()
pipelines  |       |              ^^^^^^^^^^^^
pipelines  |       |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 54, in wrapped_receive
pipelines  |       |     msg = await self.receive()
pipelines  |       |           ^^^^^^^^^^^^^^^^^^^^
pipelines  |       |   File "/usr/local/lib/python3.11/site-packages/uvicorn/protocols/http/httptools_impl.py", line 596, in receive
pipelines  |       |     await self.message_event.wait()
pipelines  |       |   File "/usr/local/lib/python3.11/asyncio/locks.py", line 213, in wait
pipelines  |       |     await fut
pipelines  |       | asyncio.exceptions.CancelledError: Cancelled by cancel scope 7f957eeed0
pipelines  |       |
pipelines  |       | During handling of the above exception, another exception occurred:
pipelines  |       |
pipelines  |       | Exception Group Traceback (most recent call last):
pipelines  |       |   File "/usr/local/lib/python3.11/site-packages/starlette/responses.py", line 261, in wrap
pipelines  |       |     await func()
pipelines  |       |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 217, in stream_response
pipelines  |       |     return await super().stream_response(send)
pipelines  |       |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
pipelines  |       |   File "/usr/local/lib/python3.11/site-packages/starlette/responses.py", line 250, in stream_response
pipelines  |       |     async for chunk in self.body_iterator:
pipelines  |       |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 181, in body_stream
pipelines  |       |     raise app_exc
pipelines  |       |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 151, in coro
pipelines  |       |     await self.app(scope, receive_or_disconnect, send_no_error)
pipelines  |       |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/cors.py", line 85, in __call__
pipelines  |       |     await self.app(scope, receive, send)
pipelines  |       |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 65, in __call__
pipelines  |       |     await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
pipelines  |       |   File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
pipelines  |       |     raise exc
pipelines  |       |   File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
pipelines  |       |     await app(scope, receive, sender)
pipelines  |       |   File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 756, in __call__
pipelines  |       |     await self.middleware_stack(scope, receive, send)
pipelines  |       |   File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 776, in app
pipelines  |       |     await route.handle(scope, receive, send)
pipelines  |       |   File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 297, in handle
pipelines  |       |     await self.app(scope, receive, send)
pipelines  |       |   File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 77, in app
pipelines  |       |     await wrap_app_handling_exceptions(app, request)(scope, receive, send)
pipelines  |       |   File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
pipelines  |       |     raise exc
pipelines  |       |   File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
pipelines  |       |     await app(scope, receive, sender)
pipelines  |       |   File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 75, in app
pipelines  |       |     await response(scope, receive, send)
pipelines  |       |   File "/usr/local/lib/python3.11/site-packages/starlette/responses.py", line 258, in __call__
pipelines  |       |     async with anyio.create_task_group() as task_group:
pipelines  |       |   File "/usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 680, in __aexit__
pipelines  |       |     raise BaseExceptionGroup(
pipelines  |       | ExceptionGroup: unhandled errors in a TaskGroup (1 sub-exception)
pipelines  |       +-+---------------- 1 ----------------
pipelines  |         | Traceback (most recent call last):
pipelines  |         |   File "/usr/local/lib/python3.11/site-packages/uvicorn/protocols/http/httptools_impl.py", line 435, in run_asgi
pipelines  |         |     result = await app(  # type: ignore[func-returns-value]
pipelines  |         |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
pipelines  |         |   File "/usr/local/lib/python3.11/site-packages/uvicorn/middleware/proxy_headers.py", line 78, in __call__
pipelines  |         |     return await self.app(scope, receive, send)
pipelines  |         |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
pipelines  |         |   File "/usr/local/lib/python3.11/site-packages/fastapi/applications.py", line 1054, in __call__
pipelines  |         |     await super().__call__(scope, receive, send)
pipelines  |         |   File "/usr/local/lib/python3.11/site-packages/starlette/applications.py", line 123, in __call__
pipelines  |         |     await self.middleware_stack(scope, receive, send)
pipelines  |         |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/errors.py", line 186, in __call__
pipelines  |         |     raise exc
pipelines  |         |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/errors.py", line 164, in __call__
pipelines  |         |     await self.app(scope, receive, _send)
pipelines  |         |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 189, in __call__
pipelines  |         |     with collapse_excgroups():
pipelines  |         |   File "/usr/local/lib/python3.11/contextlib.py", line 158, in __exit__
pipelines  |         |     self.gen.throw(typ, value, traceback)
pipelines  |         |   File "/usr/local/lib/python3.11/site-packages/starlette/_utils.py", line 93, in collapse_excgroups
pipelines  |         |     raise exc
pipelines  |         |   File "/usr/local/lib/python3.11/site-packages/starlette/responses.py", line 261, in wrap
pipelines  |         |     await func()
pipelines  |         |   File "/usr/local/lib/python3.11/site-packages/starlette/responses.py", line 250, in stream_response
pipelines  |         |     async for chunk in self.body_iterator:
pipelines  |         |   File "/usr/local/lib/python3.11/site-packages/starlette/concurrency.py", line 65, in iterate_in_threadpool
pipelines  |         |     yield await anyio.to_thread.run_sync(_next, as_iterator)
pipelines  |         |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
pipelines  |         |   File "/usr/local/lib/python3.11/site-packages/anyio/to_thread.py", line 56, in run_sync
pipelines  |         |     return await get_async_backend().run_sync_in_worker_thread(
pipelines  |         |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
pipelines  |         |   File "/usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 2177, in run_sync_in_worker_thread
pipelines  |         |     return await future
pipelines  |         |            ^^^^^^^^^^^^
pipelines  |         |   File "/usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 859, in run
pipelines  |         |     result = context.run(func, *args)
pipelines  |         |              ^^^^^^^^^^^^^^^^^^^^^^^^
pipelines  |         |   File "/usr/local/lib/python3.11/site-packages/starlette/concurrency.py", line 54, in _next
pipelines  |         |     return next(iterator)
pipelines  |         |            ^^^^^^^^^^^^^^
pipelines  |         |   File "/app/main.py", line 665, in stream_content
pipelines  |         |     for line in res:
pipelines  |         |   File "/app/./pipelines/anthropic_manifold_pipeline.py", line 166, in stream_response
pipelines  |         |     raise Exception(f"Error: {response.status_code} - {response.text}")
pipelines  |         | Exception: Error: 401 - {"type":"error","error":{"type":"authentication_error","message":"invalid x-api-key"}}
pipelines  |         +------------------------------------
pipelines  |
pipelines  | During handling of the above exception, another exception occurred:
pipelines  |
pipelines  | Traceback (most recent call last):
pipelines  |   File "/usr/local/lib/python3.11/site-packages/uvicorn/protocols/http/httptools_impl.py", line 435, in run_asgi
pipelines  |     result = await app(  # type: ignore[func-returns-value]
pipelines  |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
pipelines  |   File "/usr/local/lib/python3.11/site-packages/uvicorn/middleware/proxy_headers.py", line 78, in __call__
pipelines  |     return await self.app(scope, receive, send)
pipelines  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
pipelines  |   File "/usr/local/lib/python3.11/site-packages/fastapi/applications.py", line 1054, in __call__
pipelines  |     await super().__call__(scope, receive, send)
pipelines  |   File "/usr/local/lib/python3.11/site-packages/starlette/applications.py", line 123, in __call__
pipelines  |     await self.middleware_stack(scope, receive, send)
pipelines  |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/errors.py", line 186, in __call__
pipelines  |     raise exc
pipelines  |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/errors.py", line 164, in __call__
pipelines  |     await self.app(scope, receive, _send)
pipelines  |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 189, in __call__
pipelines  |     with collapse_excgroups():
pipelines  |   File "/usr/local/lib/python3.11/contextlib.py", line 158, in __exit__
pipelines  |     self.gen.throw(typ, value, traceback)
pipelines  |   File "/usr/local/lib/python3.11/site-packages/starlette/_utils.py", line 93, in collapse_excgroups
pipelines  |     raise exc
pipelines  |   File "/usr/local/lib/python3.11/site-packages/starlette/responses.py", line 261, in wrap
pipelines  |     await func()
pipelines  |   File "/usr/local/lib/python3.11/site-packages/starlette/responses.py", line 250, in stream_response
pipelines  |     async for chunk in self.body_iterator:
pipelines  |   File "/usr/local/lib/python3.11/site-packages/starlette/concurrency.py", line 65, in iterate_in_threadpool
pipelines  |     yield await anyio.to_thread.run_sync(_next, as_iterator)
pipelines  |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
pipelines  |   File "/usr/local/lib/python3.11/site-packages/anyio/to_thread.py", line 56, in run_sync
pipelines  |     return await get_async_backend().run_sync_in_worker_thread(
pipelines  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
pipelines  |   File "/usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 2177, in run_sync_in_worker_thread
pipelines  |     return await future
pipelines  |            ^^^^^^^^^^^^
pipelines  |   File "/usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 859, in run
pipelines  |     result = context.run(func, *args)
pipelines  |              ^^^^^^^^^^^^^^^^^^^^^^^^
pipelines  |   File "/usr/local/lib/python3.11/site-packages/starlette/concurrency.py", line 54, in _next
pipelines  |     return next(iterator)
pipelines  |            ^^^^^^^^^^^^^^
pipelines  |   File "/app/main.py", line 665, in stream_content
pipelines  |     for line in res:
pipelines  |   File "/app/./pipelines/anthropic_manifold_pipeline.py", line 166, in stream_response
pipelines  |     raise Exception(f"Error: {response.status_code} - {response.text}")
pipelines  | Exception: Error: 401 - {"type":"error","error":{"type":"authentication_error","message":"invalid x-api-key"}}
pipelines  | INFO:     <IP_ADDRESS>:55708 - "POST /anthropic.claude-3-5-sonnet-20240620/filter/inlet HTTP/1.1" 200 OK
pipelines  | anthropic.claude-3-5-sonnet-20240620
pipelines  | anthropic.claude-3-5-sonnet-20240620
pipelines  | INFO:     <IP_ADDRESS>:55724 - "POST /chat/completions HTTP/1.1" 200 OK
pipelines  | INFO:     <IP_ADDRESS>:35642 - "GET /models HTTP/1.1" 200 OK
pipelines  | INFO:     <IP_ADDRESS>:35654 - "GET /models HTTP/1.1" 200 OK
pipelines  | INFO:     <IP_ADDRESS>:35664 - "GET /pipelines HTTP/1.1" 200 OK
pipelines  | INFO:     <IP_ADDRESS>:35668 - "GET /models HTTP/1.1" 200 OK
pipelines  | INFO:     <IP_ADDRESS>:35672 - "GET /anthropic/valves/spec HTTP/1.1" 200 OK
pipelines  | INFO:     <IP_ADDRESS>:35686 - "GET /models HTTP/1.1" 200 OK
pipelines  | INFO:     <IP_ADDRESS>:35700 - "GET /anthropic/valves HTTP/1.1" 200 OK
pipelines  | INFO:     <IP_ADDRESS>:35714 - "GET /models HTTP/1.1" 200 OK
pipelines  | INFO:     <IP_ADDRESS>:35716 - "POST /anthropic/valves/update HTTP/1.1" 200 OK
pipelines  | INFO:     <IP_ADDRESS>:35724 - "GET /pipelines HTTP/1.1" 200 OK
pipelines  | INFO:     <IP_ADDRESS>:35738 - "GET /models HTTP/1.1" 200 OK
pipelines  | INFO:     <IP_ADDRESS>:35754 - "GET /models HTTP/1.1" 200 OK
pipelines  | INFO:     <IP_ADDRESS>:35760 - "GET /anthropic/valves/spec HTTP/1.1" 200 OK
pipelines  | INFO:     <IP_ADDRESS>:35764 - "GET /models HTTP/1.1" 200 OK
pipelines  | INFO:     <IP_ADDRESS>:35774 - "GET /anthropic/valves HTTP/1.1" 200 OK
pipelines  | INFO:     <IP_ADDRESS>:43800 - "POST /anthropic.claude-3-5-sonnet-20240620/filter/inlet HTTP/1.1" 200 OK
pipelines  | anthropic.claude-3-5-sonnet-20240620
pipelines  | anthropic.claude-3-5-sonnet-20240620
pipelines  | INFO:     <IP_ADDRESS>:43812 - "POST /chat/completions HTTP/1.1" 200 OK
pipelines  | INFO:     <IP_ADDRESS>:43826 - "POST /anthropic.claude-3-5-sonnet-20240620/filter/outlet HTTP/1.1" 200 OK
pipelines  | INFO:     <IP_ADDRESS>:43842 - "POST /anthropic.claude-3-5-sonnet-20240620/filter/inlet HTTP/1.1" 200 OK
pipelines  | anthropic.claude-3-5-sonnet-20240620
pipelines  | anthropic.claude-3-5-sonnet-20240620
pipelines  | INFO:     <IP_ADDRESS>:43844 - "POST /chat/completions HTTP/1.1" 200 OK
^Ccanceled

Today getting the same error as @realies. After resaving the API-Key in the UI under Pipelines it works for a while.
RESET_PIPELINES_DIR is not set to true. No action taken.
PIPELINES_REQUIREMENTS_PATH not specified. Skipping installation of requirements.
Downloading pipeline files from https://raw.githubusercontent.com/justinh-rahb/open-webui-pipelines/anthropic-fix/examples/pipelines/providers/anthropic_manifold_pipeline.py to ./pipelines...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  6523  100  6523    0     0  26845      0 --:--:-- --:--:-- --:--:-- 26843
Downloading pipeline files from https://raw.githubusercontent.com/open-webui/pipelines/main/examples/pipelines/providers/openai_dalle_manifold_pipeline.py to ./pipelines...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  2491  100  2491    0     0  10863      0 --:--:-- --:--:-- --:--:-- 10877
pip install requests  sseclient-py
Requirement already satisfied: requests in /usr/local/lib/python3.11/site-packages (2.32.2)
Collecting sseclient-py
  Downloading sseclient_py-1.8.0-py2.py3-none-any.whl.metadata (2.0 kB)
Requirement already satisfied: charset-normalizer<4,>=2 in /usr/local/lib/python3.11/site-packages (from requests) (3.3.2)
Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.11/site-packages (from requests) (3.7)
Requirement already satisfied: urllib3<3,>=1.21.1 in /usr/local/lib/python3.11/site-packages (from requests) (2.2.2)
Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.11/site-packages (from requests) (2024.7.4)
Downloading sseclient_py-1.8.0-py2.py3-none-any.whl (8.8 kB)
Installing collected packages: sseclient-py
Successfully installed sseclient-py-1.8.0
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv

[notice] A new release of pip is available: 24.0 -> 24.2
[notice] To update, run: pip install --upgrade pip
No requirements found in frontmatter of ./pipelines/openai_dalle_manifold_pipeline.py.
INFO:     Started server process [42]
INFO:     Waiting for application startup.
INFO:     Application startup complete.
INFO:     Uvicorn running on http://<IP_ADDRESS>:9099 (Press CTRL+C to quit)
Loaded module: anthropic_manifold_pipeline
Loaded module: openai_dalle_manifold_pipeline
on_startup:anthropic_manifold_pipeline
on_startup:openai_dalle_manifold_pipeline
INFO:     <IP_ADDRESS>:49114 - "GET /models HTTP/1.1" 200 OK
INFO:     <IP_ADDRESS>:46652 - "GET /models HTTP/1.1" 200 OK
INFO:     <IP_ADDRESS>:46658 - "POST /anthropic.claude-3-5-sonnet-20240620/filter/inlet HTTP/1.1" 200 OK
anthropic.claude-3-5-sonnet-20240620
anthropic.claude-3-5-sonnet-20240620
INFO:     <IP_ADDRESS>:46674 - "POST /chat/completions HTTP/1.1" 200 OK
ERROR:    Exception in ASGI application
  + Exception Group Traceback (most recent call last):
  |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 192, in __call__
  |     await response(scope, wrapped_receive, send)
  |   File "/usr/local/lib/python3.11/site-packages/starlette/responses.py", line 258, in __call__
  |     async with anyio.create_task_group() as task_group:
  |   File "/usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 680, in __aexit__
  |     raise BaseExceptionGroup(
  | ExceptionGroup: unhandled errors in a TaskGroup (1 sub-exception)
  +-+---------------- 1 ----------------
    | Exception Group Traceback (most recent call last):
    |   File "/usr/local/lib/python3.11/site-packages/starlette/responses.py", line 261, in wrap
    |     await func()
    |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 217, in stream_response
    |     return await super().stream_response(send)
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/usr/local/lib/python3.11/site-packages/starlette/responses.py", line 250, in stream_response
    |     async for chunk in self.body_iterator:
    |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 181, in body_stream
    |     raise app_exc
    |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 151, in coro
    |     await self.app(scope, receive_or_disconnect, send_no_error)
    |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/cors.py", line 85, in __call__
    |     await self.app(scope, receive, send)
    |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 65, in __call__
    |     await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
    |   File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
    |     raise exc
    |   File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
    |     await app(scope, receive, sender)
    |   File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 756, in __call__
    |     await self.middleware_stack(scope, receive, send)
    |   File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 776, in app
    |     await route.handle(scope, receive, send)
    |   File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 297, in handle
    |     await self.app(scope, receive, send)
    |   File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 77, in app
    |     await wrap_app_handling_exceptions(app, request)(scope, receive, send)
    |   File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
    |     raise exc
    |   File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
    |     await app(scope, receive, sender)
    |   File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 75, in app
    |     await response(scope, receive, send)
    |   File "/usr/local/lib/python3.11/site-packages/starlette/responses.py", line 258, in __call__
    |     async with anyio.create_task_group() as task_group:
    |   File "/usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 680, in __aexit__
    |     raise BaseExceptionGroup(
    | ExceptionGroup: unhandled errors in a TaskGroup (1 sub-exception)
    +-+---------------- 1 ----------------
      | Traceback (most recent call last):
      |   File "/usr/local/lib/python3.11/site-packages/uvicorn/protocols/http/httptools_impl.py", line 435, in run_asgi
      |     result = await app(  # type: ignore[func-returns-value]
      |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      |   File "/usr/local/lib/python3.11/site-packages/uvicorn/middleware/proxy_headers.py", line 78, in __call__
      |     return await self.app(scope, receive, send)
      |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      |   File "/usr/local/lib/python3.11/site-packages/fastapi/applications.py", line 1054, in __call__
      |     await super().__call__(scope, receive, send)
      |   File "/usr/local/lib/python3.11/site-packages/starlette/applications.py", line 123, in __call__
      |     await self.middleware_stack(scope, receive, send)
      |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/errors.py", line 186, in __call__
      |     raise exc
      |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/errors.py", line 164, in __call__
      |     await self.app(scope, receive, _send)
      |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 189, in __call__
      |     with collapse_excgroups():
      |   File "/usr/local/lib/python3.11/contextlib.py", line 158, in __exit__
      |     self.gen.throw(typ, value, traceback)
      |   File "/usr/local/lib/python3.11/site-packages/starlette/_utils.py", line 93, in collapse_excgroups
      |     raise exc
      |   File "/usr/local/lib/python3.11/site-packages/starlette/responses.py", line 261, in wrap
      |     await func()
      |   File "/usr/local/lib/python3.11/site-packages/starlette/responses.py", line 250, in stream_response
      |     async for chunk in self.body_iterator:
      |   File "/usr/local/lib/python3.11/site-packages/starlette/concurrency.py", line 65, in iterate_in_threadpool
      |     yield await anyio.to_thread.run_sync(_next, as_iterator)
      |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      |   File "/usr/local/lib/python3.11/site-packages/anyio/to_thread.py", line 56, in run_sync
      |     return await get_async_backend().run_sync_in_worker_thread(
      |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      |   File "/usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 2177, in run_sync_in_worker_thread
      |     return await future
      |            ^^^^^^^^^^^^
      |   File "/usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 859, in run
      |     result = context.run(func, *args)
      |              ^^^^^^^^^^^^^^^^^^^^^^^^
      |   File "/usr/local/lib/python3.11/site-packages/starlette/concurrency.py", line 54, in _next
      |     return next(iterator)
      |            ^^^^^^^^^^^^^^
      |   File "/app/main.py", line 665, in stream_content
      |     for line in res:
      |   File "/app/./pipelines/anthropic_manifold_pipeline.py", line 166, in stream_response
      |     raise Exception(f"Error: {response.status_code} - {response.text}")
      | Exception: Error: 401 - {"type":"error","error":{"type":"authentication_error","message":"invalid x-api-key"}}
      +------------------------------------

During handling of the above exception, another exception occurred:

  + Exception Group Traceback (most recent call last):
  |   File "/usr/local/lib/python3.11/site-packages/starlette/_utils.py", line 87, in collapse_excgroups
  |     yield
  |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 190, in __call__
  |     async with anyio.create_task_group() as task_group:
  |   File "/usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 680, in __aexit__
  |     raise BaseExceptionGroup(
  | ExceptionGroup: unhandled errors in a TaskGroup (1 sub-exception)
  +-+---------------- 1 ----------------
    | Traceback (most recent call last):
    |   File "/usr/local/lib/python3.11/site-packages/starlette/responses.py", line 265, in __call__
    |     await wrap(partial(self.listen_for_disconnect, receive))
    |   File "/usr/local/lib/python3.11/site-packages/starlette/responses.py", line 261, in wrap
    |     await func()
    |   File "/usr/local/lib/python3.11/site-packages/starlette/responses.py", line 238, in listen_for_disconnect
    |     message = await receive()
    |               ^^^^^^^^^^^^^^^
    |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 54, in wrapped_receive
    |     msg = await self.receive()
    |           ^^^^^^^^^^^^^^^^^^^^
    |   File "/usr/local/lib/python3.11/site-packages/uvicorn/protocols/http/httptools_impl.py", line 596, in receive
    |     await self.message_event.wait()
    |   File "/usr/local/lib/python3.11/asyncio/locks.py", line 213, in wait
    |     await fut
    | asyncio.exceptions.CancelledError: Cancelled by cancel scope 77ced5b27890
    |
    | During handling of the above exception, another exception occurred:
    |
    | Exception Group Traceback (most recent call last):
    |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 192, in __call__
    |     await response(scope, wrapped_receive, send)
    |   File "/usr/local/lib/python3.11/site-packages/starlette/responses.py", line 258, in __call__
    |     async with anyio.create_task_group() as task_group:
    |   File "/usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 680, in __aexit__
    |     raise BaseExceptionGroup(
    | ExceptionGroup: unhandled errors in a TaskGroup (1 sub-exception)
    +-+---------------- 1 ----------------
      | Traceback (most recent call last):
      |   File "/usr/local/lib/python3.11/site-packages/starlette/responses.py", line 265, in __call__
      |     await wrap(partial(self.listen_for_disconnect, receive))
      |   File "/usr/local/lib/python3.11/site-packages/starlette/responses.py", line 261, in wrap
      |     await func()
      |   File "/usr/local/lib/python3.11/site-packages/starlette/responses.py", line 238, in listen_for_disconnect
      |     message = await receive()
      |               ^^^^^^^^^^^^^^^
      |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 128, in receive_or_disconnect
      |     message = await wrap(wrapped_receive)
      |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^
      |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 123, in wrap
      |     result = await func()
      |              ^^^^^^^^^^^^
      |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 54, in wrapped_receive
      |     msg = await self.receive()
      |           ^^^^^^^^^^^^^^^^^^^^
      |   File "/usr/local/lib/python3.11/site-packages/uvicorn/protocols/http/httptools_impl.py", line 596, in receive
      |     await self.message_event.wait()
      |   File "/usr/local/lib/python3.11/asyncio/locks.py", line 213, in wait
      |     await fut
      | asyncio.exceptions.CancelledError: Cancelled by cancel scope 77ced5b376d0
      |
      | During handling of the above exception, another exception occurred:
      |
      | Exception Group Traceback (most recent call last):
      |   File "/usr/local/lib/python3.11/site-packages/starlette/responses.py", line 261, in wrap
      |     await func()
      |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 217, in stream_response
      |     return await super().stream_response(send)
      |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      |   File "/usr/local/lib/python3.11/site-packages/starlette/responses.py", line 250, in stream_response
      |     async for chunk in self.body_iterator:
      |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 181, in body_stream
      |     raise app_exc
      |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 151, in coro
      |     await self.app(scope, receive_or_disconnect, send_no_error)
      |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/cors.py", line 85, in __call__
      |     await self.app(scope, receive, send)
      |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 65, in __call__
      |     await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
      |   File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
      |     raise exc
      |   File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
      |     await app(scope, receive, sender)
      |   File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 756, in __call__
      |     await self.middleware_stack(scope, receive, send)
      |   File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 776, in app
      |     await route.handle(scope, receive, send)
      |   File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 297, in handle
      |     await self.app(scope, receive, send)
      |   File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 77, in app
      |     await wrap_app_handling_exceptions(app, request)(scope, receive, send)
      |   File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
      |     raise exc
      |   File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
      |     await app(scope, receive, sender)
      |   File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 75, in app
      |     await response(scope, receive, send)
      |   File "/usr/local/lib/python3.11/site-packages/starlette/responses.py", line 258, in __call__
      |     async with anyio.create_task_group() as task_group:
      |   File "/usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 680, in __aexit__
      |     raise BaseExceptionGroup(
      | ExceptionGroup: unhandled errors in a TaskGroup (1 sub-exception)
      +-+---------------- 1 ----------------
        | Traceback (most recent call last):
        |   File "/usr/local/lib/python3.11/site-packages/uvicorn/protocols/http/httptools_impl.py", line 435, in run_asgi
        |     result = await app(  # type: ignore[func-returns-value]
        |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        |   File "/usr/local/lib/python3.11/site-packages/uvicorn/middleware/proxy_headers.py", line 78, in __call__
        |     return await self.app(scope, receive, send)
        |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        |   File "/usr/local/lib/python3.11/site-packages/fastapi/applications.py", line 1054, in __call__
        |     await super().__call__(scope, receive, send)
        |   File "/usr/local/lib/python3.11/site-packages/starlette/applications.py", line 123, in __call__
        |     await self.middleware_stack(scope, receive, send)
        |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/errors.py", line 186, in __call__
        |     raise exc
        |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/errors.py", line 164, in __call__
        |     await self.app(scope, receive, _send)
        |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 189, in __call__
        |     with collapse_excgroups():
        |   File "/usr/local/lib/python3.11/contextlib.py", line 158, in __exit__
        |     self.gen.throw(typ, value, traceback)
        |   File "/usr/local/lib/python3.11/site-packages/starlette/_utils.py", line 93, in collapse_excgroups
        |     raise exc
        |   File "/usr/local/lib/python3.11/site-packages/starlette/responses.py", line 261, in wrap
        |     await func()
        |   File "/usr/local/lib/python3.11/site-packages/starlette/responses.py", line 250, in stream_response
        |     async for chunk in self.body_iterator:
        |   File "/usr/local/lib/python3.11/site-packages/starlette/concurrency.py", line 65, in iterate_in_threadpool
        |     yield await anyio.to_thread.run_sync(_next, as_iterator)
        |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        |   File "/usr/local/lib/python3.11/site-packages/anyio/to_thread.py", line 56, in run_sync
        |     return await get_async_backend().run_sync_in_worker_thread(
        |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        |   File "/usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 2177, in run_sync_in_worker_thread
        |     return await future
        |            ^^^^^^^^^^^^
        |   File "/usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 859, in run
        |     result = context.run(func, *args)
        |              ^^^^^^^^^^^^^^^^^^^^^^^^
        |   File "/usr/local/lib/python3.11/site-packages/starlette/concurrency.py", line 54, in _next
        |     return next(iterator)
        |            ^^^^^^^^^^^^^^
        |   File "/app/main.py", line 665, in stream_content
        |     for line in res:
        |   File "/app/./pipelines/anthropic_manifold_pipeline.py", line 166, in stream_response
        |     raise Exception(f"Error: {response.status_code} - {response.text}")
        | Exception: Error: 401 - {"type":"error","error":{"type":"authentication_error","message":"invalid x-api-key"}}
        +------------------------------------

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/uvicorn/protocols/http/httptools_impl.py", line 435, in run_asgi
    result = await app(  # type: ignore[func-returns-value]
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/uvicorn/middleware/proxy_headers.py", line 78, in __call__
    return await self.app(scope, receive, send)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/fastapi/applications.py", line 1054, in __call__
    await super().__call__(scope, receive, send)
  File "/usr/local/lib/python3.11/site-packages/starlette/applications.py", line 123, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/usr/local/lib/python3.11/site-packages/starlette/middleware/errors.py", line 186, in __call__
    raise exc
  File "/usr/local/lib/python3.11/site-packages/starlette/middleware/errors.py", line 164, in __call__
    await self.app(scope, receive, _send)
  File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 189, in __call__
    with collapse_excgroups():
  File "/usr/local/lib/python3.11/contextlib.py", line 158, in __exit__
    self.gen.throw(typ, value, traceback)
  File "/usr/local/lib/python3.11/site-packages/starlette/_utils.py", line 93, in collapse_excgroups
    raise exc
  File "/usr/local/lib/python3.11/site-packages/starlette/responses.py", line 261, in wrap
    await func()
  File "/usr/local/lib/python3.11/site-packages/starlette/responses.py", line 250, in stream_response
    async for chunk in self.body_iterator:
  File "/usr/local/lib/python3.11/site-packages/starlette/concurrency.py", line 65, in iterate_in_threadpool
    yield await anyio.to_thread.run_sync(_next, as_iterator)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/anyio/to_thread.py", line 56, in run_sync
    return await get_async_backend().run_sync_in_worker_thread(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 2177, in run_sync_in_worker_thread
    return await future
           ^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 859, in run
    result = context.run(func, *args)
             ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/starlette/concurrency.py", line 54, in _next
    return next(iterator)
           ^^^^^^^^^^^^^^
  File "/app/main.py", line 665, in stream_content
    for line in res:
  File "/app/./pipelines/anthropic_manifold_pipeline.py", line 166, in stream_response
    raise Exception(f"Error: {response.status_code} - {response.text}")
Exception: Error: 401 - {"type":"error","error":{"type":"authentication_error","message":"invalid x-api-key"}}

Sonnet 3.5 said this could help:
index 81fa910..aae40a3 100644
--- a/examples/pipelines/providers/anthropic_manifold_pipeline.py
+++ b/examples/pipelines/providers/anthropic_manifold_pipeline.py
@@ -1,8 +1,8 @@
 """
 title: Anthropic Manifold Pipeline
-author: justinh-rahb, sriparashiva
+author: justinh-rahb, sriparashiva, sonnet-3.5
 date: 2024-06-20
-version: 1.4
+version: 1.5
 license: MIT
 description: A pipeline for generating text and processing images using the Anthropic API.
 requirements: requests, sseclient-py
@@ -15,10 +15,12 @@ import json
 from typing import List, Union, Generator, Iterator
 from pydantic import BaseModel
 import sseclient
+import logging
+import threading
+import time

 from utils.pipelines.main import pop_system_message

-
 class Pipeline:
     class Valves(BaseModel):
         ANTHROPIC_API_KEY: str = ""
@@ -32,14 +34,18 @@ class Pipeline:
             **{"ANTHROPIC_API_KEY": os.getenv("ANTHROPIC_API_KEY", "your-api-key-here")}
         )
         self.url = 'https://api.anthropic.com/v1/messages'
+        self._api_key = None
+        self._api_key_lock = threading.Lock()
         self.update_headers()

     def update_headers(self):
-        self.headers = {
-            'anthropic-version': '2023-06-01',
-            'content-type': 'application/json',
-            'x-api-key': self.valves.ANTHROPIC_API_KEY
-        }
+        with self._api_key_lock:
+            self._api_key = self.valves.ANTHROPIC_API_KEY
+            self.headers = {
+                'anthropic-version': '2023-06-01',
+                'content-type': 'application/json',
+                'x-api-key': self._api_key
+            }

     def get_anthropic_models(self):
         return [
@@ -59,6 +65,7 @@ class Pipeline:

     async def on_valves_updated(self):
         self.update_headers()
+        logging.info("Anthropic API key updated")

     def pipelines(self) -> List[dict]:
         return self.get_anthropic_models()
@@ -81,10 +88,18 @@ class Pipeline:
                 "source": {"type": "url", "url": image_data["url"]},
             }

+    def ensure_fresh_api_key(self):
+        with self._api_key_lock:
+            if self._api_key != self.valves.ANTHROPIC_API_KEY:
+                self.update_headers()
+                logging.info("API key refreshed before request")
+
     def pipe(
         self, user_message: str, model_id: str, messages: List[dict], body: dict
     ) -> Union[str, Generator, Iterator]:
         try:
+            self.ensure_fresh_api_key()
+
             # Remove unnecessary keys
             for key in ['user', 'chat_id', 'title']:
                 body.pop(key, None)
@@ -141,12 +156,14 @@ class Pipeline:
             else:
                 return self.get_completion(payload)
         except Exception as e:
+            logging.error(f"Error in pipe: {e}")
             return f"Error: {e}"

     def stream_response(self, payload: dict) -> Generator:
-        response = requests.post(self.url, headers=self.headers, json=payload, stream=True)
+        try:
+            response = requests.post(self.url, headers=self.headers, json=payload, stream=True)
+            response.raise_for_status()

-        if response.status_code == 200:
             client = sseclient.SSEClient(response)
             for event in client.events():
                 try:
@@ -158,17 +175,20 @@ class Pipeline:
                     elif data["type"] == "message_stop":
                         break
                 except json.JSONDecodeError:
-                    print(f"Failed to parse JSON: {event.data}")
+                    logging.warning(f"Failed to parse JSON: {event.data}")
                 except KeyError as e:
-                    print(f"Unexpected data structure: {e}")
-                    print(f"Full data: {data}")
-        else:
-            raise Exception(f"Error: {response.status_code} - {response.text}")
+                    logging.warning(f"Unexpected data structure: {e}")
+                    logging.warning(f"Full data: {data}")
+        except requests.exceptions.RequestException as e:
+            logging.error(f"Error in stream_response: {e}")
+            yield f"Error: {e}"

     def get_completion(self, payload: dict) -> str:
-        response = requests.post(self.url, headers=self.headers, json=payload)
-        if response.status_code == 200:
+        try:
+            response = requests.post(self.url, headers=self.headers, json=payload)
+            response.raise_for_status()
             res = response.json()
             return res["content"][0]["text"] if "content" in res and res["content"] else ""
-        else:
-            raise Exception(f"Error: {response.status_code} - {response.text}")
+        except requests.exceptions.RequestException as e:
+            logging.error(f"Error in get_completion: {e}")
+            return f"Error: {e}"

wait, you're supposed to provide the key via ANTHROPIC_API_KEY?

wait, you're supposed to provide the key via ANTHROPIC_API_KEY? can keys be fetched from valves.json as a fallback?

Intended to be optional with ability to set via valves as well, but if this is not working it'll need refac. Will look into when my time allows. For now, yes, setting an ANTHROPIC_API_KEY environment variable should resolve the current issue until a new PR is made.

The day after... same problem today.

For what it's worth, I’ve been using my own pipeline since I created it and haven’t personally encountered any of the reported errors or issues. All my troubleshooting and debugging has been based on these reports, but I haven’t been able to fully reproduce them. This means I’m essentially working in the dark. I would greatly appreciate any additional information, such as logs or detailed accounts of the exact sequence of events that led to these outcomes, even if it feels excessive or "too much detail", let me decide that.

How do I enable debugging, so that I can see the  the used API key?

I have the same error. Brand new install, valid key used on other things.

I'm also having to save api key manually (for both Anthropic and Dall-E) manifold pipelines every time the docker container restarts. What is more Strange is that api keys are there and correct, I just have press save button.

@bgeneto Pipeline headers need to be updated at startup, I have create another here #271


remove post-installations script from khiops packages

Java configuration is in khiops-env in the package khiops-core. It is not updated by khiops package anymore. The trick is that this configuration is triggered by the presence of khiops.jar
On the docker files, We pin the jdk version to the smallest one on each distro (it matches most of the time the default-jdk package) The idea is to build norm.jar with the oldest jdk to have a jar compatible with all jre. Ideally we should build with jdk 1.8 on all distros but this package is not available everywhere.

I change the docker image name to khiopsdev-test-os in order to launch CI/CD without interfering with the other branches. Of course I will switch back to the original name and remove the test images before the merge.


Cannot read property 'Constructor' of undefined

I recently added bootstrap-sass to one of my projects and discovered an error message in the js console, which states that:
Uncaught TypeError: Cannot read property 'Constructor' of undefined
in file
bootstrap-popover.js and line 33
Thx for any help!
mk

Same problem. I was including jquery.js twice.


Video Scrubbing

Current behavior
Trying to create a video review app that allows scrubbing back and forth on finger drag ( slow, and fast) behavior works as expected going forwards using the .seek() exact function however when moving backwards it stalls and jumps multiple seek frames. I would pay someone who has developed or maintains this plugin to help me get this resolved as this is a very important and high profile project. Please advise.
https://www.dropbox.com/s/mvz9x0nnwc9ejd5/Example.mov?dl=0

Any updates on this? Did you figure something out? I need this as well.
I found this article (https://developer.apple.com/library/archive/qa/qa1820/_index.html) and I implemented the concept in javascript, but it didn't really help.

Currently running into the same issue as described. I need fine grained control (forwards and backwards) and while forward works mostly fine, backwards is super slow and laggy.

If we are talking about simple video player slider, I advice you to write own slider with react-native-reanimated. Some tips and it will works as expected at 99%. But you shouldn't call seek when sliding, just control it with second variable that takes control over onProgress when you sliding.
If we are talking about controls (such as 15sec back and forward). I faced with onProgress asynchronization (only android, IOS works well), because after seeking, seek doesn't call onProgress, and we should synchronize state manually, but it hard)

@hueniverse i think you should keep this issue open. This is a real feature which make sens to support. On my custom branch, i implement it with a custom manifest parser on an old exoplayer, i think last exoplayer version supports it natively.

@freeboub not sure if this is a bug or feature request? When you say the latest version supports it does it mean this issue will be fixed as soon as we upgrade or will need more work?


Using lookups in stack sets

Hey,
Wonder if it might be possible to implement functionalities like ec2.Vpc.fromLookup when creating stack sets.
Thx.

My use case is that I am trying to add augment default VPC but I cannot use lookups because of lack of region/account upon synth.

are you able to do something similar using a stackset cloudformation resource directly? the stackset template needs to be generic across accounts/regions since the CDK will produce one template per stackset. there could be potential to use intrinsic functions. if you have an example of how this works using a stackset template then we could work backwards from that to see if it could be a good fit for the L2 construct.

I actually build a custom resource that loads up properties to perform Vpc.fromAttribtes.
With this I was able load up default vpc.
Does that count?


How to use with Vega Lite?

Oh man, I have @1M points of data that are killing the browser. Any chance this works with Vega Lite? I tried using:
{
...
usermeta: { embedOptions: { renderer: "webgl" } },
...
}

but got:
ERROR Unrecognized renderer type: webgl

I got it to load, but now I'm getting the following error:
ERROR TypeError: Cannot read property 'rgb' of null
    at _default (color.js:16)
    at rect.js:82
    at visit (visit.js:35)
    at WebGLRenderer.drawGL (rect.js:79)
    at WebGLRenderer.prototype.draw (WebGLRenderer.js:212)
    at group.js:44
    at visit (visit.js:35)
    at group.js:43
    at visit (visit.js:35)
    at WebGLRenderer.drawGL (group.js:9)

The web gal renderer has not been updated in years and is not working. We would love your help to get it working.