-
Notifications
You must be signed in to change notification settings - Fork 6.4k
feat: remote compaction #6795
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
feat: remote compaction #6795
Conversation
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.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ 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".
|
@codex review |
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.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ 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".
# Conflicts: # codex-rs/core/src/features.rs
| let auth_manager = self.auth_manager.clone(); | ||
| let auth = auth_manager.as_ref().and_then(|m| m.auth()); | ||
| let mut req_builder = self | ||
| .provider | ||
| .create_compact_request_builder(&self.client, &auth) | ||
| .await?; | ||
| if let SessionSource::SubAgent(sub) = &self.session_source { | ||
| let subagent = if let crate::protocol::SubAgentSource::Other(label) = sub { | ||
| label.clone() | ||
| } else { | ||
| serde_json::to_value(sub) | ||
| .ok() | ||
| .and_then(|v| v.as_str().map(std::string::ToString::to_string)) | ||
| .unwrap_or_else(|| "other".to_string()) | ||
| }; | ||
| req_builder = req_builder.header("x-openai-subagent", subagent); | ||
| } | ||
| if let Some(auth) = auth.as_ref() | ||
| && auth.mode == AuthMode::ChatGPT | ||
| && let Some(account_id) = auth.get_account_id() | ||
| { | ||
| req_builder = req_builder.header("chatgpt-account-id", account_id); | ||
| } |
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.
nit: share request building
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.
Will refactor this in a dedicated PR. This code is way too messy
… store and prompt fields
|
Manual compact is still injecting the |
…mpact_url Print full POST payload and URL with trace! in ModelClient if tracing enabled. Make get_compact_url pub(crate) for logging use. Simplify task spawning in handlers::turn without input injection.
No description provided.