Anthropic Integration Not Working - Traces Not Captured & URL Path Issue [Windows]

Hi,

I’m having issues with Lens Loop’s Anthropic integration on Windows. I have two problems:

Problem 1: Wrong URL in Documentation The documentation states to use http://localhost:31300/anthropic/v1 for Anthropic, but this returns a 404 error. The URL actually works without the /v1 suffix: http://localhost:31300/anthropic

Problem 2: No Traces Captured When I use the working URL (without /v1), the API calls work and I get responses from Claude, but no traces appear in Lens Loop.

Environment:

  • Windows
  • Lens Loop (latest)
  • Anthropic API

Test Script: I tested with this Python script to verify the behavior:

python

from anthropic import Anthropic
from dotenv import load_dotenv
import os

load_dotenv()

question = "?"

# Try multiple urls
base_url = os.getenv("ANTHROPIC_BASE_URL")
urls = [
    base_url,
    f"{base_url}/v1",
    f"{base_url}/v2",
]

for url in urls:
    print(f"Trying {url}")
    try:
        # Initialize the Anthropic client
        client = Anthropic(
            api_key=os.getenv("ANTHROPIC_API_KEY"),
            base_url=url,
            default_headers={
                "X-Loop-Project": os.getenv("ANTHROPIC_LOOP_PROJECT"),
            }
        )

        # Send the message to Claude and get the response
        message = client.messages.create(
            model="claude-haiku-4-5-20251001",
            max_tokens=1024,
            messages=[
                {"role": "user", "content": question}
            ]
        )

        print("\nClaude's response:")
        print(message.content[0].text)
    except Exception as e:
        print(f"Error: {e}")
    print("-------------------")

Output:

Trying http://localhost:31300/anthropic
Claude's response:
Hello! How can I help you today? Feel free to ask me any questions or let me know what you'd like to discuss.
-------------------
Trying http://localhost:31300/anthropic/v1
Error: Error code: 404 - {'type': 'error', 'error': {'type': 'not_found_error', 'message': 'Not Found'}, 'request_id': 'req_011CVmTuCwetrtSfTxdJRaHA'}
-------------------
Trying http://localhost:31300/anthropic/v2
Error: Error code: 404
-------------------

Troubleshooting Done:

  • Restarted Lens Loop
  • Restarted computer
  • Verified Anthropic API key works (responses come through)

Any help would be appreciated!

Thanks for the report @brunomateus — the team is actively investigating the issue. It looks like the Gemini integration may be affected as well.

Hello @brunomateus — quick update for you.

We’ve identified the root cause and implemented several fixes. The full fix will ship in the next beta release, and you’ll receive it via the automatic update as soon as it’s available.

In the meantime, we’ve also updated the documentation to address the first issue (the correct Anthropic endpoint) in the “Understanding API formats” section.

Thanks again for reporting this — it really helped us track it down.

Hello @brunomateus,

We’ve just released a new beta that resolves this issue. You can find the release notes here:
https://forums.k8slens.dev/t/loop-v2025-12-08-beta-release/6702

To make sure you’re running the latest version on Windows, please manually check for updates via:
Lens Loop → Check for Updates…

Once you’ve updated, Anthropic proxying and tracing should work as expected.

1 Like

Hello @hlaitala

Just tested it again and now it is working as expected.
Thank you for the quick update