refactor(coderd/x/chatd): own provider option construction in one function by ibetitsmike · Pull Request #27705 · coder/coder · GitHub
Skip to content

refactor(coderd/x/chatd): own provider option construction in one function - #27705

Merged
ibetitsmike merged 2 commits into
mainfrom
mike/codagt-874-provider-options-owner
Aug 4, 2026
Merged

refactor(coderd/x/chatd): own provider option construction in one function#27705
ibetitsmike merged 2 commits into
mainfrom
mike/codagt-874-provider-options-owner

Conversation

@ibetitsmike

@ibetitsmike ibetitsmike commented Jul 30, 2026

Copy link
Copy Markdown
Collaborator

Stacked on #27704.

Provider option conversion and reasoning effort injection both create OpenAI option structs, so each of the four call sites had to pair them in the right order and pick the same transport for each.

chatprovider.ProviderOptionsForCall now owns both steps, and the two helpers it wraps are unexported. The advisor, main generation, compaction override, and quickgen paths each collapse to one call.

The ARCHITECTURE section on transport selection is updated to match: ProviderOptionsForCall is described as the only entry point in chatprovider that builds provider options for a call, delegating OpenAI conversion to chatopenai.ProviderOptionsFromChatConfig, and it now records that the quickgen turn status label and chat summary paths deliberately send no provider options.

Mux prepared this PR on Mike's behalf.

@linear-code

linear-code Bot commented Jul 30, 2026

Copy link
Copy Markdown

ibetitsmike commented Jul 30, 2026

Copy link
Copy Markdown
Collaborator Author

@ibetitsmike

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🎉

Reviewed commit: b718b966c5

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@ibetitsmike
ibetitsmike marked this pull request as ready for review August 2, 2026 20:34
@ibetitsmike
ibetitsmike requested a review from ThomasK33 August 2, 2026 20:47
@ibetitsmike
ibetitsmike force-pushed the mike/codagt-874-provider-options-owner branch from b718b96 to 054bf53 Compare August 3, 2026 14:12
@ibetitsmike

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 054bf53ff3

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread coderd/x/chatd/chatprovider/reasoningeffort_internal_test.go
@ibetitsmike
ibetitsmike force-pushed the mike/codagt-874-provider-options-owner branch from 054bf53 to a8aed38 Compare August 3, 2026 14:35
@ibetitsmike

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. More of your lovely PRs please.

Reviewed commit: a8aed386ac

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@ibetitsmike
ibetitsmike force-pushed the mike/codagt-874-provider-options-owner branch from a8aed38 to 77d2ace Compare August 3, 2026 14:52
@ibetitsmike

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Breezy!

Reviewed commit: 77d2acedd0

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@ibetitsmike
ibetitsmike force-pushed the mike/codagt-874-provider-options-owner branch from 77d2ace to ac220b8 Compare August 3, 2026 15:10
@ibetitsmike

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🚀

Reviewed commit: ac220b8a8c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@ibetitsmike
ibetitsmike force-pushed the mike/codagt-874-provider-options-owner branch from ac220b8 to 2afbff1 Compare August 3, 2026 15:25
@ibetitsmike

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Swish!

Reviewed commit: 2afbff1c92

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@ibetitsmike
ibetitsmike force-pushed the mike/codagt-874-provider-options-owner branch from 2afbff1 to ed10dc0 Compare August 3, 2026 15:37
@ibetitsmike

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Delightful!

Reviewed commit: ed10dc00d5

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@ibetitsmike
ibetitsmike force-pushed the mike/codagt-874-provider-options-owner branch from ed10dc0 to 498e741 Compare August 3, 2026 15:45
@ibetitsmike

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

@ibetitsmike
ibetitsmike force-pushed the mike/codagt-874-provider-options-owner branch from 498e741 to 8859982 Compare August 3, 2026 18:30
Base automatically changed from mike/codagt-874-transport-ownership to main August 4, 2026 08:00
…ction

Provider option conversion and reasoning effort injection both create OpenAI
option structs, so each call site had to pair them correctly and pick the same
transport. ProviderOptionsForCall now owns both steps, and the two helpers are
unexported.
@ibetitsmike
ibetitsmike force-pushed the mike/codagt-874-provider-options-owner branch from 8859982 to 3badcd3 Compare August 4, 2026 08:01
@ibetitsmike
ibetitsmike merged commit 404bb2f into main Aug 4, 2026
28 checks passed
@ibetitsmike
ibetitsmike deleted the mike/codagt-874-provider-options-owner branch August 4, 2026 08:13
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 4, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants