Skip to content

feat(copilot): add provider support for explorer autofix coding agent handoff#106798

Merged
JoshFerge merged 4 commits intomasterfrom
jferg/explorer-copilot-provider-support
Jan 23, 2026
Merged

feat(copilot): add provider support for explorer autofix coding agent handoff#106798
JoshFerge merged 4 commits intomasterfrom
jferg/explorer-copilot-provider-support

Conversation

@JoshFerge
Copy link
Member

@JoshFerge JoshFerge commented Jan 22, 2026

Summary

Adds support for the provider parameter in the explorer autofix endpoint to enable GitHub Copilot integration. This mirrors the legacy autofix behavior added in #106289 where provider is used for user-authenticated integrations like GitHub Copilot, while integration_id is used for org-installed integrations like Cursor.

Changes:

  • Add provider field to ExplorerAutofixRequestSerializer
  • Update trigger_coding_agent_handoff to accept provider and user_id params
  • Update launch_coding_agents in coding_agent_handoff.py to support provider-based authentication (GitHub Copilot uses per-user OAuth tokens)
  • Update SeerExplorerClient.launch_coding_agents to pass through provider and user_id parameters

Behavior:

  • When provider=github_copilot is passed, the endpoint uses the user's GitHub Copilot OAuth token instead of an org-wide integration
  • The endpoint validates that either integration_id or provider is provided (not both required, just one)
  • If GitHub Copilot auth is missing, returns a permission error prompting the user to connect their GitHub account

Companion to frontend PR: #106788

… handoff

Add support for the `provider` parameter in the explorer autofix endpoint
to enable GitHub Copilot integration. This mirrors the legacy autofix
behavior where `provider` is used for user-authenticated integrations
like GitHub Copilot, while `integration_id` is used for org-installed
integrations like Cursor.

Changes:
- Add `provider` field to ExplorerAutofixRequestSerializer
- Update trigger_coding_agent_handoff to accept provider and user_id
- Update launch_coding_agents in coding_agent_handoff.py to support
  provider-based authentication (GitHub Copilot)
- Update SeerExplorerClient.launch_coding_agents to pass through
  provider and user_id parameters
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Jan 22, 2026
Adds validation to return a 400 error when both integration_id and
provider are specified for coding_agent_handoff. Users must choose
one or the other, not both.
@JoshFerge JoshFerge marked this pull request as ready for review January 23, 2026 16:16
@JoshFerge JoshFerge requested a review from a team as a code owner January 23, 2026 16:16
Copy link
Contributor

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

elif integration_id is not None:
integration, installation = _validate_and_get_integration(organization, integration_id)
else:
raise ValidationError("Either integration_id or provider must be provided")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Misleading error for unsupported provider values

Low Severity

When a user provides an unsupported provider value (anything other than "github_copilot") without integration_id, the API layer validation passes but the error from launch_coding_agents incorrectly states "Either integration_id or provider must be provided". The provider was provided—it's just not a supported value. The API serializer accepts any string for provider but only "github_copilot" is actually handled, leading to a confusing error message that doesn't reflect the actual problem.

Additional Locations (1)

Fix in Cursor Fix in Web

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

eh, we'll handle this better once we have more than 1 provider

@JoshFerge JoshFerge enabled auto-merge (squash) January 23, 2026 16:28
@JoshFerge JoshFerge merged commit 7906cf0 into master Jan 23, 2026
67 checks passed
@JoshFerge JoshFerge deleted the jferg/explorer-copilot-provider-support branch January 23, 2026 17:25
JonasBa pushed a commit that referenced this pull request Jan 27, 2026
… handoff (#106798)

## Summary

Adds support for the `provider` parameter in the explorer autofix
endpoint to enable GitHub Copilot integration. This mirrors the legacy
autofix behavior added in #106289 where `provider` is used for
user-authenticated integrations like GitHub Copilot, while
`integration_id` is used for org-installed integrations like Cursor.

**Changes:**
- Add `provider` field to `ExplorerAutofixRequestSerializer`
- Update `trigger_coding_agent_handoff` to accept `provider` and
`user_id` params
- Update `launch_coding_agents` in `coding_agent_handoff.py` to support
provider-based authentication (GitHub Copilot uses per-user OAuth
tokens)
- Update `SeerExplorerClient.launch_coding_agents` to pass through
`provider` and `user_id` parameters

**Behavior:**
- When `provider=github_copilot` is passed, the endpoint uses the user's
GitHub Copilot OAuth token instead of an org-wide integration
- The endpoint validates that either `integration_id` or `provider` is
provided (not both required, just one)
- If GitHub Copilot auth is missing, returns a permission error
prompting the user to connect their GitHub account

Companion to frontend PR: #106788
@github-actions github-actions bot locked and limited conversation to collaborators Feb 8, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants