Skip to content

feat(core): Migrate chatCompressionService to model configs. - #12863

Merged
joshualitt merged 1 commit into
mainfrom
jl/cleanup-1
Nov 24, 2025
Merged

feat(core): Migrate chatCompressionService to model configs.#12863
joshualitt merged 1 commit into
mainfrom
jl/cleanup-1

Conversation

@joshualitt

@joshualitt joshualitt commented Nov 11, 2025

Copy link
Copy Markdown
Contributor

Summary

Cleanup after landing model configs. Wires up the compression service to BaseLlmClient.generateContent(https://github.com/google-gemini/gemini-cli/blob/main/packages/core/src/core/baseLlmClient.ts#L189).

Related Issues

Related to #12590

How to Validate

Tests pass, evals are not negatively impacted.

Pre-Merge Checklist

  • Updated relevant documentation and README (if needed)
  • Added/updated tests (if needed)
  • Noted breaking changes (if any)
  • Validated on required platforms/methods:
    • MacOS
      • npm run
      • npx
      • Docker
      • Podman
      • Seatbelt
    • Windows
      • npm run
      • npx
      • Docker
    • Linux
      • npm run
      • npx
      • Docker

@github-actions

github-actions Bot commented Nov 11, 2025

Copy link
Copy Markdown

Size Change: +1.05 kB (0%)

Total Size: 21.1 MB

Filename Size Change
./bundle/gemini.js 21.1 MB +1.05 kB (0%)
ℹ️ View Unchanged
Filename Size
./bundle/sandbox-macos-permissive-closed.sb 1.03 kB
./bundle/sandbox-macos-permissive-open.sb 890 B
./bundle/sandbox-macos-permissive-proxied.sb 1.31 kB
./bundle/sandbox-macos-restrictive-closed.sb 3.29 kB
./bundle/sandbox-macos-restrictive-open.sb 3.36 kB
./bundle/sandbox-macos-restrictive-proxied.sb 3.56 kB

compressed-size-action

@joshualitt
joshualitt force-pushed the jl/cleanup-1 branch 2 times, most recently from babf6e1 to 92f867c Compare November 12, 2025 04:19
@joshualitt
joshualitt force-pushed the jl/cleanup-1 branch 5 times, most recently from 5751a1c to 1958d97 Compare November 12, 2025 05:38
@joshualitt
joshualitt force-pushed the jl/cleanup-1 branch 4 times, most recently from 779305c to e7e7328 Compare November 20, 2025 22:29
@joshualitt joshualitt changed the title feat(core): Add BaseLlmClient.generateContent to obviate the need to use the contentGenerator directly. feat(core): Migrate chatCompressionService to model configs. Nov 22, 2025
},
"chat-compression-3-pro": {
"model": "gemini-3-pro-preview",
"generateContentConfig": {}

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is intentional, the existing requests do not pass any settings

@joshualitt
joshualitt marked this pull request as ready for review November 22, 2025 01:49
@joshualitt
joshualitt requested a review from a team as a code owner November 22, 2025 01:49
@joshualitt
joshualitt added this pull request to the merge queue Nov 24, 2025
Merged via the queue into main with commit e50bf6a Nov 24, 2025
22 checks passed
@joshualitt
joshualitt deleted the jl/cleanup-1 branch November 24, 2025 20:38
kimjune01 added a commit to kimjune01/gemini-cli-claude that referenced this pull request Nov 24, 2025
Merge latest upstream changes from google-gemini/gemini-cli main branch.

## Merge Conflict Resolution

**File:** packages/core/src/services/chatCompressionService.ts

**Conflict:** Both branches modified the compression service API:
- main: Migrated to new model config system (getBaseLlmClient, modelConfigKey)
- feat/deliberate-compaction: Added goal-focused compression (userGoal parameter)

**Resolution:** Combined both changes:
- Used new model config API from main (getBaseLlmClient, modelStringToModelConfigAlias, abortSignal)
- Preserved goal-focused enhancement (getChatCompressionPrompt(userGoal))
- Result: New API + goal awareness working together

**Additional Changes:**
- Updated chatCompressionService.test.ts to use new BaseLlmClient API
- Changed all test mocks from getContentGenerator to getBaseLlmClient
- Added BaseLlmClient import and proper type casts
- Fixed linting: changed messagesPreserved/messagesCompressed to const
- Build passes successfully

## Upstream Changes Merged

From google-gemini/gemini-cli main (95693e2..d14779b):
- feat(core): Land bool for alternate system prompt (google-gemini#13764)
- feat(hooks): Hook Agent Lifecycle Integration (google-gemini#9105)
- feat(hooks): Hook Event Handling (google-gemini#9097)
- fix: Minor improvements to configs and getPackageJson (google-gemini#12510)
- feat(hooks): Hook Telemetry Infrastructure (google-gemini#9082)
- feat(core): Migrate chatCompressionService to model configs (google-gemini#12863)
- Add session subtask in /stats command (google-gemini#13750)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
thacio added a commit to thacio/auditaria that referenced this pull request Nov 26, 2025
danpalmer pushed a commit to danpalmer/gemini-cli that referenced this pull request Nov 29, 2025
@sripasg sripasg added the size/m A medium sized PR label Jun 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/m A medium sized PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants