fix(providers): remove type: ignore suppressions from registry.py and resolve underlying type errors #3459

Merged
freemo merged 1 commits from fix/providers-registry-type-ignore-suppressions into master 2026-04-05 18:20:04 +00:00

1 Commits

Author SHA1 Message Date
freemo 8afe3587ce fix(providers): remove type: ignore suppressions from registry.py and resolve underlying type errors
CI / lint (pull_request) Successful in 22s
CI / typecheck (pull_request) Successful in 53s
CI / quality (pull_request) Successful in 32s
CI / security (pull_request) Successful in 1m2s
CI / build (pull_request) Successful in 19s
CI / helm (pull_request) Successful in 28s
CI / unit_tests (pull_request) Successful in 6m58s
CI / e2e_tests (pull_request) Successful in 18m28s
CI / integration_tests (pull_request) Successful in 23m0s
CI / coverage (pull_request) Successful in 11m8s
CI / docker (pull_request) Successful in 1m24s
CI / status-check (pull_request) Successful in 1s
CI / benchmark-publish (pull_request) Has been skipped
CI / benchmark-regression (pull_request) Successful in 57m8s
Remove all 11 # type: ignore suppressions from src/cleveragents/providers/registry.py:

- Resolve import-untyped suppressions (lines 529, 537, 545) for langchain_groq,
  langchain_together, and langchain_cohere by adding inline type stubs under
  typings/ following the existing pattern for langchain_anthropic and langchain_openai.

- Remove arg-type suppressions (lines 475, 482, 490, 525, 533, 541, 549) from
  LLM constructor call sites. These were unnecessary given the pyrightconfig.json
  reportUnknown* settings already in place.

- Fix the arg-type suppression on the llm_factory closure (line 657) by capturing
  the narrowed ProviderType in a local variable (resolved_provider_type: ProviderType)
  so Pyright can verify the type without suppression.

Verified: nox -e typecheck passes with 0 errors, nox -e lint passes.

Closes #3421
2026-04-05 17:52:50 +00:00