charmbracelet / charmbracelet/fantasy

Deduplicate code across providers and core logic

Open
#95 0 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.