charmbracelet / charmbracelet/fantasy
Deduplicate code across providers and core logic
Open
- Dominant language
- Go
- Stars
- 987
- Forks
- 137
- Avg merge
- 14h 41m
- Merged PRs (30d)
- 12
Description
The `dupl` tool identified 431 clone groups in the codebase.
Significant duplication was found in:
- Provider implementations (`anthropic`, `google`, `openai`, `openrouter`, `openaicompat`)
- `language_model_hooks.go`
- `provider_options.go`
- Core provider logic
- `agent.go`
- Test files (`*_test.go`, `providertests`)
We should refactor this code to use shared abstractions where possible to improve maintainability and reduce technical debt.
Contributor guide
Assessment
This issue has not been assessed yet.