-
Notifications
You must be signed in to change notification settings - Fork 55
fix(canvas): send model when generating CONTEXT.md with agent #3389
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,4 @@ | ||
| import { DEFAULT_GATEWAY_MODEL } from "@posthog/agent/gateway-models"; | ||
| import { | ||
| TASK_SERVICE, | ||
| type TaskService, | ||
|
|
@@ -42,6 +43,11 @@ export function useGenerateContext(channelId: string, channelName: string) { | |
| // test a local build of these features before merging. | ||
| workspaceMode, | ||
| allowNoRepo: true, | ||
| // A cloud run pairs a runtime adapter with a model, and the API | ||
| // rejects one without the other. Since this flow lets the agent pick | ||
| // its repo at runtime, it never surfaces a model picker, so pin the | ||
| // default gateway model here to match the adapter the saga defaults to. | ||
| model: DEFAULT_GATEWAY_MODEL, | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This call now sends |
||
| }, | ||
| (output) => invalidateTasks(output.task), | ||
| ); | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When the gateway does not advertise
claude-opus-4-8for a user, org, or region, this flow still sends that fixed model instead of falling back through the existing model resolver. The generate-context run can then fail validation or startup even though the request now includes amodelfield.