@posthog/agent 2.3.548 → 2.3.556

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@posthog/agent",
3
- "version": "2.3.548",
3
+ "version": "2.3.556",
4
4
  "repository": "https://github.com/PostHog/code",
5
5
  "description": "TypeScript agent framework wrapping Claude Agent SDK with Git-based task execution for PostHog",
6
6
  "exports": {
@@ -102,6 +102,12 @@ function buildMcpServers(
102
102
  }
103
103
 
104
104
  function buildEnvironment(): Record<string, string> {
105
+ const bedrockFallbackHeader = "x-posthog-use-bedrock-fallback: true";
106
+ const existingCustomHeaders = process.env.ANTHROPIC_CUSTOM_HEADERS;
107
+ const customHeaders = existingCustomHeaders
108
+ ? `${existingCustomHeaders}\n${bedrockFallbackHeader}`
109
+ : bedrockFallbackHeader;
110
+
105
111
  return {
106
112
  ...process.env,
107
113
  ELECTRON_RUN_AS_NODE: "1",
@@ -110,6 +116,8 @@ function buildEnvironment(): Record<string, string> {
110
116
  ENABLE_TOOL_SEARCH: "auto:0",
111
117
  // Enable idle state as end-of-turn signal (required for SDK 0.2.114+)
112
118
  CLAUDE_CODE_EMIT_SESSION_STATE_EVENTS: "1",
119
+ // Route to AWS Bedrock as a fallback when Anthropic returns 5xx
120
+ ANTHROPIC_CUSTOM_HEADERS: customHeaders,
113
121
  };
114
122
  }
115
123