fix(pi): preserve cloud model selection - #4032
Conversation
|
😎 Merged successfully - details. |
|
React Doctor found 1 issue in 1 file · 1 warning. 1 warning
Reviewed by React Doctor for commit |
|
| import { TEAM_SKILLS_SERVICE } from "@posthog/core/skills/identifiers"; | ||
| import type { TeamSkillsService } from "@posthog/core/skills/teamSkillsService"; | ||
| import { resolveService } from "@posthog/di/container"; | ||
| import { fetchPosthogPiModelCatalog } from "@posthog/harness/extensions/posthog-provider/model-catalog"; |
There was a problem hiding this comment.
Harness import bypasses web alias
The web production build resolves workspace subpaths through posthogSrcAliases because their fallback exports do not resolve under Rollup, but the new @posthog/harness import has no corresponding alias. As a result, the web build cannot resolve this module.
Context Used: CLAUDE.md (source)
Knowledge Base Used:
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/web/src/web-host-router.ts
Line: 7
Comment:
**Harness import bypasses web alias**
The web production build resolves workspace subpaths through `posthogSrcAliases` because their fallback exports do not resolve under Rollup, but the new `@posthog/harness` import has no corresponding alias. As a result, the web build cannot resolve this module.
**Context Used:** CLAUDE.md ([source](https://github.com/posthog/code/blob/main/CLAUDE.md))
**Knowledge Base Used:**
- [apps/web and apps/mobile: browser and mobile clients](https://app.greptile.com/posthog-org-19734/-/custom-context/knowledge-base/posthog/code/-/docs/client-apps-web-mobile.md)
- [Harness (`hog`/`harness` CLI)](https://app.greptile.com/posthog-org-19734/-/custom-context/knowledge-base/posthog/code/-/docs/harness-cli.md)
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.a1a9c8b to
e8f8e2a
Compare
Is this a worker limitation on CF side or model-wide? meaning, will this impact the baseten rollout as well? |
Cloudflare specific limitation |
Problem
Cloud Pi tasks did not use the selected model at start. After a renderer reload, the Pi picker could show only the saved model.
Cloudflare GLM 5.2 also failed before responding because LiteLLM interpreted the client-side
web_searchtool as native web search and forwarded unsupportedweb_search_options.Changes
posthog_web_searchso LiteLLM does not treat it as a native web-search tool for GLM.web_searchsubagent tool settings by translating them to the new tool name.Validation
pnpm --filter @posthog/harness buildpnpm --filter @posthog/harness testpnpm --filter @posthog/core test -- piSessionController.test.tspnpm --filter @posthog/web buildAutomatic notifications