Skip to content

Add two-tier model config integration for LLM cost control#170

Merged
G9Pedro merged 1 commit intomasterfrom
cursor/llm-model-cost-tiers-9e61
Mar 14, 2026
Merged

Add two-tier model config integration for LLM cost control#170
G9Pedro merged 1 commit intomasterfrom
cursor/llm-model-cost-tiers-9e61

Conversation

@G9Pedro
Copy link
Copy Markdown
Contributor

@G9Pedro G9Pedro commented Mar 13, 2026

Summary

  • Added managed config keys for tiered model selection in src/lib/config-manager.ts:
    • models.background
    • models.default
    • models.complex
  • Extended managed config defaults/schema to include a models section while preserving all existing keys and behavior.
  • Added coercion/validation support for the new models.* keys and ensured resetConfig clears tiered model overrides.
  • Updated observer compression model resolution so that when observer.compression.model is not set, it uses models.background as the fallback model.

Scope safety

  • No existing features were removed.
  • No existing config keys were removed.
  • Search backends, fact extraction, embeddings, and provider support remain intact.

Tests

  • Added/updated tests in existing suites:
    • src/lib/config-manager.test.ts
    • src/observer/observer.test.ts
  • Verified focused suites:
    • npm test -- src/lib/config-manager.test.ts src/lib/llm-provider.test.ts src/lib/llm-adapter.test.ts src/observer/observer.test.ts
  • Verified full suite:
    • npm test

All tests pass.

Open in Web Open in Cursor 

Co-authored-by: G9Pedro <G9Pedro@users.noreply.github.com>
@G9Pedro G9Pedro marked this pull request as ready for review March 14, 2026 00:21
@G9Pedro G9Pedro merged commit 9c2b0e1 into master Mar 14, 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.

2 participants