Files
DeepTutor/tests
Wong 0952d33ed7 fix(llm): survive api_key key pools in the config resolver (#1300)
* fix(llm): survive api_key key pools in the config resolver

A catalog profile configured with multiple keys (api_key as a JSON array)
crashes get_llm_config(): the placeholder check in
_get_llm_config_from_resolver does set membership on the raw list, which
raises TypeError: unhashable type: 'list' — taking down every LLM call in
the process, not just multi-key deployments.

This is a regression of #962's behavior: cc23cbe3a (#863) added a second
placeholder check in the resolver without wrapping the key through
primary_api_key(), which #962 introduced for exactly this reason. The
provider layer (OpenAICompatProvider) already accepts str | list[str] and
rotates via KeyPool — only the resolver entry was left behind.

Fix: unwrap through primary_api_key() for the placeholder check and pass
the full list through to the provider so KeyPool keeps rotating.

Tests: 4-key array reaches KeyPool intact; placeholder check uses the
primary key; single-key profiles behave exactly as before.

* style: ruff format

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: interia <interia@interiadeMac-mini.local>
Co-authored-by: Claude <noreply@anthropic.com>
2026-09-10 23:44:20 +08:00
..
2026-09-03 01:38:54 +08:00
2026-09-06 13:46:29 +08:00
2026-09-03 01:38:54 +08:00
2026-09-06 13:46:29 +08:00
2026-09-06 13:46:29 +08:00
2026-09-06 13:46:29 +08:00
2026-09-06 13:46:29 +08:00