@posthog/agent 2.1.69 → 2.1.70

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.1.69",
3
+ "version": "2.1.70",
4
4
  "repository": "https://github.com/PostHog/twig",
5
5
  "description": "TypeScript agent framework wrapping Claude Agent SDK with Git-based task execution for PostHog",
6
6
  "exports": {
@@ -498,15 +498,15 @@ export class ClaudeAcpAgent extends BaseAcpAgent {
498
498
  }
499
499
 
500
500
  private async setModelWithFallback(q: Query, modelId: string): Promise<void> {
501
+ const sdkModelId = toSdkModelId(modelId);
501
502
  try {
502
- await q.setModel(modelId);
503
- return;
503
+ await q.setModel(sdkModelId);
504
504
  } catch (err) {
505
- const fallback = toSdkModelId(modelId);
506
- if (fallback === modelId) {
505
+ if (sdkModelId === modelId) {
507
506
  throw err;
508
507
  }
509
- await q.setModel(fallback);
508
+ // Fallback to raw gateway ID if SDK model ID failed
509
+ await q.setModel(modelId);
510
510
  }
511
511
  }
512
512