500 Internal Server Error when creating agents

I’m getting the same error for both MCP and chat feature in Streamlit.

[12:04:57] Agent service started
INFO:     Started server process [91]
INFO:     Waiting for application startup.
INFO:     Application startup complete.
INFO:     Uvicorn running on http://0.0.0.0:8100 (Press CTRL+C to quit)
12:10:07.811 reasoner run prompt=xxx
12:10:07.922   preparing model and tools run_step=1
12:10:07.924   model request
12:10:07.985 advisor_agent run prompt=xxx
12:10:07.991   preparing model and tools run_step=1
12:10:07.992   model request
Exception invoking Archon for thread 81b66e4a-7720-44f3-8486-655ec86d29c5: 'NoneType' object cannot be interpreted as an integer
INFO:     172.17.0.1:35794 - "POST /invoke HTTP/1.1" 500 Internal Server Error

For context, I’m using openrouter’s mistral-small-3.1-24b-instruct:free (primary) and deepseek-r1:free (reasoning) for this. My embedding is ollama’s nomic-embed-text. Database-wise, I used 1536 instead of 768 even when using nomic as it’s what seemed to work better? When I used 768 it won’t even input into the database. I have 1886 chunks although Title and Summary is Error processing Title/Summary and all embeddings are [0,0,0,0,0,0,0,…].

Maybe I’m making some stupid mistakes somewhere along the line? Please guide me.

Reason why I used 1536 instead of 768:

INFO:httpx:HTTP Request: POST "HTTP/2 400 Bad Request"
Error inserting chunk: {'code': '22000', 'details': None, 'hint': None, 'message': 'expected 768 dimensions, not 1536'}

Other errors found in logs:

Error getting title and summary: 'NoneType' object is not subscriptable
Error getting embedding: Connection error.

Read in other posts that the Free models on OpenRouter do not work well due to rate limits. I also could not chunk the Pydantic docs using nomic as the embedding model, so I had to switch to OpenAI.

1 Like