Skip to content

refactor(llm): centralize system prompts and refresh provider model IDs#43

Open
kasyap1234 wants to merge 1 commit into
rshdhere:mainfrom
kasyap1234:unify-provider
Open

refactor(llm): centralize system prompts and refresh provider model IDs#43
kasyap1234 wants to merge 1 commit into
rshdhere:mainfrom
kasyap1234:unify-provider

Conversation

@kasyap1234

Copy link
Copy Markdown

• ## Description

Centralizes all LLM system prompts in internal/llm/provider.go and updates provider model IDs to current targets across
code, tests, and docs for consistency and maintainability.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Code refactoring
  • Performance improvement
  • Test addition or update

Related Issues

Closes #
Fixes #
Related to #

Changes Made

  • Centralized provider system prompts in internal/llm/provider.go with GetSystemPrompt(providerName string).
  • Replaced inline prompt literals across provider clients (openai, anthropic, gemini, grok, groq, deepseek, kimi, qwen,
    perplexity, ollama) to use centralized prompts.
  • Updated model IDs across providers and aligned tests/docs:
    • anthropic: claude-haiku-4-5-20251001
    • gemini: gemini-3-flash-preview
    • grok: grok-4-1-fast-reasoning
    • groq: openai/gpt-oss-20b
    • ollama: gpt-oss:20b
    • kimi: kimi-k2.5
    • qwen: qwen3-coder-plus
    • deepseek: deepseek-chat (V3.2 alias)
    • perplexity: sonar-pro
    • openai: gpt-5-mini
  • Added/updated tests for centralized prompt resolution (internal/llm/provider_test.go) and provider model expectations.
  • Updated README.md and PROVIDERS.md to match runtime defaults.

Testing

Ran full test suite and targeted package tests after model/prompt refactor.

  • All existing tests pass
  • New tests added for new functionality
  • Manual testing performed

Test Steps

  1. Run full suite:
    GOCACHE=/tmp/gocache GOMODCACHE=/tmp/gomodcache /usr/local/go/bin/go test ./...
  2. Run targeted LLM suites (optional):
    GOCACHE=/tmp/gocache GOMODCACHE=/tmp/gomodcache /usr/local/go/bin/go test ./internal/llm/...
  3. Verify docs/model strings:
    rg -n "claude-haiku-4-5-20251001|grok-4-1-fast-reasoning|gpt-oss:20b|openai/gpt-oss-20b|qwen3-coder-plus|kimi-k2.5|
    gemini-3-flash-preview|deepseek-chat|sonar-pro" README.md PROVIDERS.md internal/llm

Checklist

  • My code follows the project's style guidelines
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published

Screenshots (if applicable)

N/A (CLI/backend/documentation changes only).

Additional Notes

  • This is a refactor-focused PR with no intentional breaking CLI/API changes.
  • Consolidating prompts in one place should simplify future provider tuning and reduce drift across implementations.

@vibecheck-bot

Copy link
Copy Markdown
Collaborator

LGTM!

@codecov

codecov Bot commented Feb 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@rshdhere

rshdhere commented Feb 9, 2026

Copy link
Copy Markdown
Owner

I see one of the CI is failing can you please look into it, apart from all of that LGTM

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.

3 participants