Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

chore(ci): set llm gateway bedrock test region (#64165)

Chris Volzer72a867f24cc6
diff --git a/.github/workflows/ci-llm-gateway.yml b/.github/workflows/ci-llm-gateway.yml
index e030201fe689..9da9e2bd187a 100644
--- a/.github/workflows/ci-llm-gateway.yml
+++ b/.github/workflows/ci-llm-gateway.yml
@@ -82,6 +82,7 @@ jobs:
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
OPENROUTER_API_KEY: ${{ secrets.OPENROUTER_API_KEY }}
FIREWORKS_API_KEY: ${{ secrets.FIREWORKS_API_KEY }}
+ AWS_DEFAULT_REGION: us-east-1
run: uv run pytest tests/ -v --tb=short --junitxml=junit.xml
- name: Upload test results
diff --git a/services/llm-gateway/tests/test_bedrock.py b/services/llm-gateway/tests/test_bedrock.py
index af94267bf95f..9c6b917dd79c 100644
--- a/services/llm-gateway/tests/test_bedrock.py
+++ b/services/llm-gateway/tests/test_bedrock.py
@@ -398,6 +398,7 @@ class TestBedrockCountTokensViaProvider:
call_args = mock_count_tokens.call_args
assert call_args[0][1] == expected_model_id # second positional arg is model
+ @patch.dict("os.environ", {"AWS_REGION": "", "AWS_DEFAULT_REGION": ""}, clear=False)
@patch("llm_gateway.api.anthropic.get_settings")
def test_requires_bedrock_region(
self,