Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
359559a
feat(compact): reconcile openai_responses_compact with main (#30)
crstrn13 Sep 7, 2026
6ed56f7
Merge branch 'main' into feat/compact-filter-issue-30
crstrn13 Sep 7, 2026
b4f6590
Merge branch 'main' into feat/compact-filter-issue-30
crstrn13 Sep 7, 2026
a41ef0c
feat(compact): assert OpenAI contract and persisted DB state end-to-end.
crstrn13 Sep 9, 2026
47af0ff
Merge remote-tracking branch 'upstream/main' into feat/compact-filter…
crstrn13 Sep 9, 2026
d6ce970
fix(compact): reject invalid compaction config.
crstrn13 Sep 9, 2026
bdce1c1
fix(compact): cosmetics.
crstrn13 Sep 9, 2026
578102e
Merge branch 'main' into feat/compact-filter-issue-30
crstrn13 Sep 9, 2026
95925a4
fix(compact): avoid accidental doc list from hyphen in module doc
crstrn13 Sep 9, 2026
d6cc123
Merge branch 'main' into feat/compact-filter-issue-30
crstrn13 Sep 9, 2026
2531c29
Merge remote-tracking branch 'upstream/main' into feat/compact-filter…
crstrn13 Sep 9, 2026
0e3a40c
Merge branch 'main' into feat/compact-filter-issue-30
crstrn13 Sep 9, 2026
1742483
fix(compact): address review nits on usage overflow and config parsing
crstrn13 Sep 9, 2026
92d2c48
docs(compact): update module scope to cover the explicit endpoint
crstrn13 Sep 10, 2026
ca1144e
Merge branch 'main' into feat/compact-filter-issue-30
crstrn13 Sep 10, 2026
e02ffc4
style(compact): reflow module scope doc to comment width
crstrn13 Sep 10, 2026
4704dc7
refactor(compact): small refactor around compaction items and their p…
crstrn13 Sep 10, 2026
8eeb648
fix: add completed status to persisted responses.
crstrn13 Sep 10, 2026
d766c0f
Merge remote-tracking branch 'upstream/main' into feat/compact-filter…
crstrn13 Sep 10, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions apis/src/openai/responses/compact/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@ pub(super) struct CompactFilterConfig {
#[serde(default = "default_tiktoken_encoding")]
pub tiktoken_encoding: String,

/// Prefix prepended to the summary when translating compaction
/// items to backend messages. Defaults to
/// `"[Previous conversation summary]\n\n"`.
#[serde(default)]
pub summary_prefix: Option<String>,

/// Callout timeout in milliseconds.
#[serde(default)]
pub timeout_ms: Option<u64>,
Expand Down Expand Up @@ -94,6 +100,9 @@ pub(super) struct ValidatedConfig {
/// Tiktoken encoding name.
pub tiktoken_encoding: String,

/// Prefix prepended to the summary in backend messages.
pub summary_prefix: String,

/// Shared callout settings (timeout, failure mode, status).
pub callout: CalloutSettings,
}
Expand Down Expand Up @@ -143,6 +152,10 @@ pub(super) fn build_config(raw: &CompactFilterConfig) -> Result<ValidatedConfig,
address_policy,
default_model: raw.default_model.clone(),
tiktoken_encoding: raw.tiktoken_encoding.clone(),
summary_prefix: raw
.summary_prefix
.clone()
.unwrap_or_else(|| crate::openai::responses::compact::DEFAULT_SUMMARY_PREFIX.to_owned()),
callout: CalloutSettings {
timeout_ms,
on_failure: raw.on_failure.unwrap_or(OnFailure::Closed),
Expand Down
744 changes: 614 additions & 130 deletions apis/src/openai/responses/compact/mod.rs

Large diffs are not rendered by default.

Loading
Loading