fix(provider): ignore empty token rotation (#2184)

This commit is contained in:
huanghuoguoguo
2026-05-16 11:21:09 +08:00
committed by GitHub
parent 0a669c7016
commit 01d06898fb
2 changed files with 11 additions and 0 deletions

View File

@@ -81,6 +81,15 @@ def test_token_manager_filters_blank_and_duplicate_tokens():
assert token_mgr.get_token() == 'first-key'
def test_token_manager_next_token_ignores_empty_token_list():
token_mgr = TokenManager('provider-uuid', [])
token_mgr.next_token()
assert token_mgr.get_token() == ''
assert token_mgr.using_token_index == 0
@pytest.mark.asyncio
async def test_openai_requester_initialize_uses_placeholder_api_key(monkeypatch):
captured_kwargs = {}