[deep-report] Type the nested provider/model pricing map in awf_config.go instead of map[string]any
- Dominant language
- Go
- Stars
- 5.1k
- Forks
- 541
- Avg merge
- 5h 48m
- Merged PRs (30d)
- 773
Description
### Problem
`pkg/workflow/awf_config.go` (~line 198) models per-provider model pricing as `Providers map[string]any`, with the actual shape (`providers..models..cost.{input,output,cache_read,cache_write,reasoning}`) documented only in a code comment rather than the type system.
### Why it matters
Nothing catches a typo'd cost field name (e.g. `cache_read` vs `cache-read`) or a missing nesting level at compile time; errors surface only when pricing silently resolves to zero/missing at runtime.
### Suggested fix
Introduce named struct types for the provider/model/cost levels (e.g. `ProviderPricing`, `ModelPricing`, `ModelCost`) matching the documented shape, replacing the `map[string]any`.
### Data source
Typist code-quality analysis (Priority 3), live-verified against current `pkg/workflow/awf_config.go` in this cycle — no matching open issue found.
**Suggested Agent:** general coding agent (Go)
**Estimated Effort:** Medium (touches pricing lookup call sites; needs test coverage for nested access)
> [!WARNING]
>
> Firewall blocked 1 domain
>
> The following domain was blocked by the firewall during workflow execution:
>
> - `api.anthropic.com`
>
> To allow these domains, add them to the `network.allowed` list in your workflow frontmatter:
>
> ```yaml
> network:
> allowed:
> - defaults
> - "api.anthropic.com"
> ```
>
> See [Network Configuration](https://github.github.com/gh-aw/reference/network/) for more information.
>
>
> Generated by [🔬 Deep Report](https://github.com/github/gh-aw/actions/runs/34969464054) · claude · agent · 279.5 AIC · ⌖ 12.7 AIC · ⊞ 12.8K · [◷](https://github.com/search?q=repo%3Agithub%2Fgh-aw+is%3Aissue+%22gh-aw-workflow-call-id%3A+github%2Fgh-aw%2Fdeep-report%22&type=issues)
> - [x] expires on Sep 17, 2026, 4:50 AM UTC-08:00
Contributor guide
Research direction
Start in pkg/workflow/awf_config.go around line 198 and trace the pricing lookup call sites that consume Providers. Define the typed provider, model, and cost levels for the documented nested shape, then add or update tests covering nested access and malformed or missing cost fields.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- tooling
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 64/100