[BUG] AWS Bedrock LLM provider not recognized at startup (fails without other API keys)
Bug Description
When configuring llm.provider: aws-bedrock in cipher.yml and setting the required AWS environment variables (AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_REGION, etc.), Cipher still fails to start.
The startup validation in src/app/index.ts requires at least one of OPENAI_API_KEY, ANTHROPIC_API_KEY, OPENROUTER_API_KEY, or OLLAMA_BASE_URL to be present.
This effectively prevents using AWS Bedrock as the sole LLM provider, even though the official documentation lists it as supported.
Steps to Reproduce
-
Create a
.envwith only AWS Bedrock credentials and model info:AWS_ACCESS_KEY_ID=*** AWS_SECRET_ACCESS_KEY=*** AWS_REGION=us-west-2 AWS_LLM_MODEL=us.anthropic.claude-sonnet-4-20250514-v1:0 AWS_EMBEDDING_MODEL=amazon.titan-embed-text-v2:0 AWS_EMBEDDING_DIMENSION=1024 -
Configure
memAgent/cipher.yml:llm: provider: aws-bedrock model: ${AWS_LLM_MODEL} region: ${AWS_REGION} embedding: type: aws-bedrock model: ${AWS_EMBEDDING_MODEL} dimensions: ${AWS_EMBEDDING_DIMENSION} region: ${AWS_REGION} -
Run cipher in terminal.
-
Observe error.
Expected Behavior
Cipher should start successfully and use AWS Bedrock for both LLM and embeddings without requiring keys for other providers.
Actual Behavior
Cipher exits with:
ERROR: No API key or Ollama configuration found, please set at least one of OPENAI_API_KEY, ANTHROPIC_API_KEY, OPENROUTER_API_KEY, or OLLAMA_BASE_URL
Available providers: OpenAI, Anthropic, OpenRouter, Ollama, Qwen
Thank you for reporting the bug, i will have a look and resolve it asap
Hi, @RyoTakayama-Eurus. It looks like the LLM provider configuration was set incorrectly. The correct configuration should be:
lm:
provider: aws
model: ${AWS_LLM_MODEL}
maxIterations: 50
aws:
region: ${AWS_REGION}
accessKeyId: ${AWS_ACCESS_KEY_ID}
secretAccessKey: ${AWS_SECRET_ACCESS_KEY}
sessionToken: ${AWS_SESSION_TOKEN} # Optional, for temporary credentials
Please try this, and leave a comment if the initialization still fails.
Sorry for the delay, i resolved the problem in pr #212, you will need to change the yml configuration file accordingly to the example. Thank you for reporting the issue.
Thank you for the super quick fix!
Just to share an additional detail: AWS_INFERENCE_PROFILE_ARN needs to be specified.
Also, here’s an example of one-line command for adding MCP in Claude Code:
claude mcp add cipher \
-e MCP_SERVER_MODE="aggregator" \
-e AWS_ACCESS_KEY_ID="***" \
-e AWS_SECRET_ACCESS_KEY="***" \
-e AWS_REGION="us-west-2" \
-e AWS_INFERENCE_PROFILE_ARN="arn:aws:bedrock:us-west-2:***:inference-profile/us.anthropic.claude-sonnet-4-20250514-v1:0" \
-- cipher --mode mcp
Thank you for the super quick fix!
Just to share an additional detail: AWS_INFERENCE_PROFILE_ARN needs to be specified.
Also, here’s an example of one-line command for adding MCP in Claude Code:
claude mcp add cipher \ -e MCP_SERVER_MODE="aggregator" \ -e AWS_ACCESS_KEY_ID="***" \ -e AWS_SECRET_ACCESS_KEY="***" \ -e AWS_REGION="us-west-2" \ -e AWS_INFERENCE_PROFILE_ARN="arn:aws:bedrock:us-west-2:***:inference-profile/us.anthropic.claude-sonnet-4-20250514-v1:0" \ -- cipher --mode mcp
That's good to know, I'll add this guide in the docs soon