Skip to content

feat: add MiniMax and OpenAI as configurable LLM providers for generative search#1026

Open
octo-patch wants to merge 1 commit into
kantord:mainfrom
octo-patch:feat/minimax-llm-provider
Open

feat: add MiniMax and OpenAI as configurable LLM providers for generative search#1026
octo-patch wants to merge 1 commit into
kantord:mainfrom
octo-patch:feat/minimax-llm-provider

Conversation

@octo-patch
Copy link
Copy Markdown

Summary

  • Refactor the hardcoded Ollama integration in --generative to support configurable LLM providers
  • Add MiniMax as a cloud LLM provider via OpenAI-compatible API (api.minimax.io/v1)
  • Add OpenAI as an additional cloud provider option
  • Support provider auto-detection from MINIMAX_API_KEY / OPENAI_API_KEY environment variables

Changes

File Change
seagoat/utils/llm_provider.py New provider abstraction with streaming support for Ollama/OpenAI/MiniMax
seagoat/utils/generative.py Refactored to use provider module instead of hardcoded Ollama
seagoat/utils/config.py Extended config schema with generative section (provider/model/apiKey/baseUrl/temperature)
seagoat/cli.py Pass config to enhance_results()
pyproject.toml Add openai SDK dependency
README.md Add provider configuration docs with table

Configuration

# .seagoat.yml
generative:
  provider: minimax        # ollama | openai | minimax
  model: MiniMax-M2.5      # optional

Or just set MINIMAX_API_KEY env var for auto-detection.

Test plan

  • 31 unit tests for llm_provider module (provider detection, config, streaming for all 3 providers)
  • 13 unit tests for generative module (thinking-tag stripping, result filtering, config passing)
  • 9 integration tests (config validation, end-to-end MiniMax flow, provider switching)
  • All 53 new tests pass
  • All 9 existing config tests pass (no regressions)
  • Verify with real Ollama server (backward-compatible, no behavior change for existing users)
  • Verify with real MiniMax API key

Refactor the hardcoded Ollama integration in --generative to support
multiple LLM providers (Ollama, OpenAI, MiniMax) via configuration.

- Add seagoat/utils/llm_provider.py with provider abstraction layer
- Extend config schema with generative.provider/model/apiKey/baseUrl/temperature
- Auto-detect provider from MINIMAX_API_KEY/OPENAI_API_KEY env vars
- MiniMax uses OpenAI-compatible API at api.minimax.io/v1
- Add openai SDK dependency for cloud provider support
- Add 31 unit tests + 9 integration tests + 13 generative tests (53 total)
- Update README with provider configuration table
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.

1 participant