Problem
Opencode has already been added as a target (thank you), but not as an LLM provider, and it would be convenient if it was. I did not submit the fork below as a formal PR (but could) as it was low effort coded, but it is is a working example of using the opencode cli as the LLM provider similar to other sources already included in caliber.
Proposed solution
https://github.com/stgreenb/ai-setup
Changes
- New provider:
src/llm/opencode.ts - CLI-based LLM provider using opencode run --format json
- Types: Added 'opencode' to
ProviderType in src/llm/types.ts
- Registration: Provider registered in
src/llm/index.ts
- Config: Default model +
CALIBER_USE_OPENCODE env var support in src/llm/config.ts
- Model recovery: Added opencode to known models in
src/llm/model-recovery.ts
- Interactive setup: Added OpenCode option to
src/commands/interactive-provider-setup.ts
- Tests: Unit tests in
src/llm/__tests__/opencode.test.ts (4 tests)
Alternatives considered
No response
Problem
Opencode has already been added as a target (thank you), but not as an LLM provider, and it would be convenient if it was. I did not submit the fork below as a formal PR (but could) as it was low effort coded, but it is is a working example of using the opencode cli as the LLM provider similar to other sources already included in caliber.
Proposed solution
https://github.com/stgreenb/ai-setup
Changes
src/llm/opencode.ts- CLI-based LLM provider usingopencode run --format jsonProviderTypeinsrc/llm/types.tssrc/llm/index.tsCALIBER_USE_OPENCODEenv var support insrc/llm/config.tssrc/llm/model-recovery.tssrc/commands/interactive-provider-setup.tssrc/llm/__tests__/opencode.test.ts(4 tests)Alternatives considered
No response