nice-island-80049
07/29/2025, 2:14 PMopenhands:ERROR: agent_controller.py:306 - [Agent Controller be36e3ca54134bcfbe5d4fd2a25c3d1f] Error while running the agent (session ID: be36e3ca54134bcfbe5d4fd2a25c3d1f): litellm.APIConnectionError: BedrockException - {"Message":"Invalid API Key format: Must start with pre-defined prefix"}.
I've been trying to figure out what this prefix is, since all I've done is change the version from 0.48 to 0.49+, but for now I simply revert back and the setup is working fine.calm-artist-7206
07/29/2025, 2:25 PMcalm-artist-7206
07/29/2025, 2:28 PMnice-island-80049
07/29/2025, 3:09 PMllm_api_key in .openhands/settings.json
looks like perhaps right here I've got to have a key regardlesscalm-artist-7206
07/29/2025, 3:13 PMcalm-artist-7206
07/29/2025, 3:14 PMnice-island-80049
07/29/2025, 3:16 PMnice-island-80049
07/29/2025, 3:16 PMcalm-artist-7206
07/29/2025, 3:16 PMcalm-artist-7206
07/29/2025, 3:16 PMnice-island-80049
07/29/2025, 3:17 PMnice-island-80049
07/29/2025, 3:46 PMAWS_BEARER_TOKEN_BEDROCK
2. ✅ Directly set the token at key llm_api_key in settings.json (still retained old env vars for access/secret/region)
3. ✅ Only set llm_api_key and remove all prior references to access/secret/region
At this point I've got 0.50 running and my settings.json file looks like this, no other AWS keys present in env vars...
...
"llm_model": "bedrock/us.anthropic.claude-sonnet-4-20250514-v1:0",
"llm_api_key": "<long-term-bedrock-api-key>",
"llm_base_url": "https://bedrock-runtime.us-east-1.amazonaws.com",
...
so, definitely worth further testing but I seem to have a solution to the issue. Appreciate the assist!calm-artist-7206
07/29/2025, 3:47 PM