Skip to content

Example test fails with "Error planning actions: BamlClientHttpError 404 Not Found" (tokens: 0 in, 0 out) #146

@ViktorRusin

Description

@ViktorRusin

I'm trying to run the basic example test generated by npx magnitude init, but the agent fails on the first agent.act(...) with:

Error planning actions: BamlError: BamlClientError: BamlClientHttpError:
Request failed with status code: 404 Not Found. {"detail":"Not Found"}
tokens: 0 in, 0 out

No browser actions are executed beyond the initial page load. It looks like the planning backend (BAML) is returning 404 before any LLM calls are made.


Environment

  • OS: macOS (Apple Silicon, Mac mini)
  • Node: v20.19.5
  • npm: v10.8.2
  • Package: magnitude-test@0.3.12
  • Command used: `

magnitude.config.ts

example.mag.ts

npx magnitude` (from project root)

The DeepInfra endpoint and model are verified to be working via curl:

curl -X POST https://api.deepinfra.com/v1/openai/chat/completions
-H "Authorization: Bearer $DEEPINFRA_API_KEY"
-H "Content-Type: application/json"
-d '{
"model": "Qwen/Qwen2.5-VL-32B-Instruct",
"messages": [
{ "role": "user", "content": "Say hello world in English, only that." }
]
}'

Response:
{
"id": "chatcmpl-...",
"model": "Qwen/Qwen2.5-VL-32B-Instruct",
"choices": [
{
"message": {
"role": "assistant",
"content": "Hello World!"
},
...
}
],
"usage": { "prompt_tokens": 28, "completion_tokens": 4, "total_tokens": 32 }
}

Produces:

Magnitude v0.3.12

☰ tests/magnitude/example.mag.ts
✕ can add and complete todos [31.6s]
> create 3 todos
↳ Error planning actions: BamlError: BamlClientError: BamlClientHttpError:
Request failed with status code: 404 Not Found. {"detail":"Not Found"}

✗ 1 failed tokens: 0 in, 0 out
Failures:
tests/magnitude/example.mag.ts > can add and complete todos
↳ Error planning actions: BamlError: BamlClientError: BamlClientHttpError:
Request failed with status code: 404 Not Found. {"detail":"Not Found"}

Notes:

tokens: 0 in, 0 out — it looks like no LLM calls are made at all.

The error is on "planning actions", not on the direct LLM call.

With DEBUG=magnitude*, the last log line is:
{"level":50,"name":"agent","msg":"Error planning actions: BamlError: BamlClientError: BamlClientHttpError: Request failed with status code: 404 Not Found. {"detail":"Not Found"}"}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions