Something When Wrong. Anna LLM sampling did not respond within 110s. Please try again

Hello. I try to build my action plans with anna app but when I try to run my app with anna-app dev, then after I wait for so long time the error appear as in the screenshot. even I try with the mock sampling using anna-app dev --mock-llm ./fixtures/sampling-mock.jsonl but both of them have the same error like as in the screenshot. please help me about my issue.

and also when I use the OpenAI API key from anna cloud then I have the error 401 that said OpenAI API call failed: Error code: 401 - {‘error’: {‘message’: ‘Incorrect API key provided: sk-proj-********************************************sbNo. You can find your API key at https://platform.openai.com/account/api-keys.’, ‘type’: ‘invalid_request_error’, ‘code’: ‘invalid_api_key’, ‘param’: None}, ‘status’: 401} . I tried to revoke the key and create a new one again but still no luck for me. Iam really confused and need help about this serious issue.

Hi @daviddprtma! :waving_hand: Welcome, and thanks for the detailed report with screenshots — that really helps! :flexed_biceps:

Good news: your setup is probably fine. The two errors you’re seeing actually point us to exactly where the problem is. Let me walk you through it :detective:

:magnifying_glass_tilted_left: Clue 1: the 110s timeout message

The message “Anna LLM sampling did not respond within 110s” doesn’t come from the Anna platform — none of our components (CLI, dev harness, SDK, or backend) use a 110s timeout or produce that text. It looks like it comes from your app’s own frontend code (a watchdog/timeout around your LLM call). That’s totally fine to have! But it means the real error is happening somewhere underneath, and the UI is just reporting “I waited and nothing came back.”

:magnifying_glass_tilted_left: Clue 2: --mock-llm shows the same error

This is the most useful clue you gave us! :bullseye: The mock LLM bridge never times out — even if no fixture matches your request, it replies instantly with a canned response. So if your app still hangs for 110s under --mock-llm, that tells us the call that’s timing out isn’t going through the Anna LLM surface at all (anna.llm.complete in the iframe, or sampling/createMessage from an executa). The mock simply never sees it.

:magnifying_glass_tilted_left: Clue 3: the OpenAI 401

The error format Error code: 401 - {'error': {'code': 'invalid_api_key', ...}} is the OpenAI SDK talking directly to api.openai.com. Combined with clue 2, this strongly suggests your app (or its executa) has its own OpenAI client baked in, calling OpenAI directly with an sk-proj-... key.

One important thing to clear up: Anna Cloud doesn’t issue OpenAI API keys :person_gesturing_no: — an Anna token/PAT will always get a 401 from OpenAI, no matter how many times you regenerate it. That’s why revoking and recreating didn’t help.

So the full chain is likely:

your code calls OpenAI directly → 401 (invalid key)
→ the error never propagates back to your UI
→ your 110s watchdog fires → "Something went wrong"

:white_check_mark: The good news: you don’t need an OpenAI key at all!

Anna gives you LLM access built in — no keys, no billing setup on your side:

  • From your app’s frontend: use anna.llm.complete(...) via the SDK
  • From an executa: use the reverse-RPC sampling/createMessage
  • Offline development: both of these are exactly what --mock-llm <fixture> intercepts, so your mock fixtures will start working the moment you switch over :tada:

:folded_hands: To help us confirm

If you’d like us to double-check, please share:

  1. The terminal output of anna-app dev when the error happens (the [bridge] lines will show the real exception from your executa)
  2. A snippet of how your app calls the LLM (SDK call vs. your own HTTP/OpenAI client)
  3. Your manifest.json (feel free to redact anything sensitive)

You’re very close — swap the direct OpenAI call for the built-in anna.llm API and I think everything (including your mock fixtures) will click into place. Keep building, and don’t hesitate to post follow-ups! :rocket::sparkles: