Problem / Motivation
Currently, the hiring-agent supports Ollama (local) and Gemini (Google API). There is no native support for OpenAI-compatible hosted API providers (specifically OpenCode, https://opencode.ai), which allows developers to run high-quality open-weight models like deepseek-v4-flash via API without needing local GPU hardware.
Expected behavior
Users should be able to configure their environment to use OpenCode:
- Set
LLM_PROVIDER=opencode
- Configure
OPENCODE_API_KEY
- Set
DEFAULT_MODEL=deepseek-v4-flash to parse and score resumes.
Proposed solution
Add an OpenCodeProvider implementation and integrate it:
- Add
OPENCODE = "opencode" to the ModelProvider enum in models.py.
- Implement the
OpenCodeProvider class (supporting OpenAI-compatible chat completions structure) in models.py.
- Update
initialize_llm_provider in llm_utils.py to support initializing this new provider.
- Support model parameters and map
deepseek-v4-flash to the OpenCode provider in prompt.py.
- Update
.env.example to document the new provider and model options.
- Add unit tests for the provider class and initialization logic in
tests.py using standard unittest.
Alternatives considered
- Run Ollama locally: Forces users to run models locally, which is slow or impossible on devices without dedicated/powerful GPUs.
- Use Gemini: Restricts the API pipeline to Google's models.
Additional context
I have already implemented this locally, formatted all files with Black, and verified that the unit tests pass successfully. The changes are ready for a PR.
Problem / Motivation
Currently, the hiring-agent supports Ollama (local) and Gemini (Google API). There is no native support for OpenAI-compatible hosted API providers (specifically OpenCode,
https://opencode.ai), which allows developers to run high-quality open-weight models likedeepseek-v4-flashvia API without needing local GPU hardware.Expected behavior
Users should be able to configure their environment to use OpenCode:
LLM_PROVIDER=opencodeOPENCODE_API_KEYDEFAULT_MODEL=deepseek-v4-flashto parse and score resumes.Proposed solution
Add an
OpenCodeProviderimplementation and integrate it:OPENCODE = "opencode"to theModelProviderenum inmodels.py.OpenCodeProviderclass (supporting OpenAI-compatible chat completions structure) inmodels.py.initialize_llm_providerinllm_utils.pyto support initializing this new provider.deepseek-v4-flashto the OpenCode provider inprompt.py..env.exampleto document the new provider and model options.tests.pyusing standardunittest.Alternatives considered
Additional context
I have already implemented this locally, formatted all files with
Black, and verified that the unit tests pass successfully. The changes are ready for a PR.