Skip to content

feat(compression): add summary_base_url + move compression config to YAML-only#1727

Merged
teknium1 merged 1 commit into
mainfrom
hermes/hermes-31dc9875
Mar 17, 2026
Merged

feat(compression): add summary_base_url + move compression config to YAML-only#1727
teknium1 merged 1 commit into
mainfrom
hermes/hermes-31dc9875

Conversation

@teknium1

Copy link
Copy Markdown
Contributor

Summary

Adds summary_base_url config option and moves all compression configuration to config.yaml (removing the env var bridge layer).

Based on PR #1702 by @uzaylisak. Closes #1591.

Changes

New feature: summary_base_url

compression:
  enabled: true
  summary_model: glm-4.7
  summary_provider: zai
  summary_base_url: https://api.z.ai/api/coding/paas/v4

Compression config is now YAML-only

  • cli.py: Removed compression env var bridge (CONTEXT_COMPRESSION_* no longer set from config)
  • gateway/run.py: Same — removed bridge and env var override check
  • run_agent.py: Now reads compression config directly from config.yaml via load_config() instead of env vars

Bug fix: backwards-compat block condition

  • auxiliary.compression.provider defaults to "auto" in DEFAULT_CONFIG, which is truthy — this silently prevented the compression.summary_* keys from ever being read
  • Fixed condition from not cfg_provider to not cfg_provider or cfg_provider == "auto"

Tests

  • Added test_compression_summary_base_url_from_config — verifies the full config → client flow
  • Updated bridge tests to remove compression env var assertions
  • Updated gateway parity test to assert compression bridge is absent
  • Added DEFAULT_CONFIG shape test for summary_base_url

Docs

  • Updated environment-variables.md, configuration.md, fallback-providers.md to show compression as config.yaml-only

Backward Compatibility

Fully backward compatible. Existing configs work unchanged. Users who set CONTEXT_COMPRESSION_* env vars directly (not from config bridge) still get them picked up via the generic _get_auxiliary_env_override function.

…only

- Add summary_base_url config option to compression block for custom
  OpenAI-compatible endpoints (e.g. zai, DeepSeek, Ollama)
- Remove compression env var bridges from cli.py and gateway/run.py
  (CONTEXT_COMPRESSION_* env vars no longer set from config)
- Switch run_agent.py to read compression config directly from
  config.yaml instead of env vars
- Fix backwards-compat block in _resolve_task_provider_model to also
  fire when auxiliary.compression.provider is 'auto' (DEFAULT_CONFIG
  sets this, which was silently preventing the compression section's
  summary_* keys from being read)
- Add test for summary_base_url config-to-client flow
- Update docs to show compression as config.yaml-only

Closes #1591
Based on PR #1702 by @uzaylisak
@teknium1 teknium1 force-pushed the hermes/hermes-31dc9875 branch from 12cac40 to b5ed6eb Compare March 17, 2026 11:31
@teknium1 teknium1 merged commit d1d17f4 into main Mar 17, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for multiple providers or base_url config in compression

1 participant