Repository navigation
Open
Labels
bugSomething isn't working
Description
On Windows, AI Studio cannot store API keys longer than 1,280 characters. IONOS API keys are JWTs and exceed this limit, so an IONOS provider cannot be set up on Windows. The same key works on macOS.
Prerequisites
- Windows 11
- An IONOS API key, or any other API key longer than 1,280 characters
Steps
- In the settings, add an embedding provider with IONOS as the host.
- Paste the API key.
- Save.
Expected
- The key is stored in the Windows Credential Manager, and the provider is saved.
Actual
- Saving fails. The dialog says the key could not be stored and asks to try again, which can never succeed.
- The log shows:
[mindwork_ai_studio::secret] [Source = Secret Store] Failed to store secret for mindwork-ai-studio::embedding::IONOS::Qwen 3 VL::api_key and user <user>: Value of 'password encoded as UTF-16' is longer than the platform limit of 2560 chars.
Cause
- The Windows Credential Manager limits a credential blob to 2,560 bytes (
CRED_MAX_CREDENTIAL_BLOB_SIZE). Thewindows-native-keyring-storecrate stores passwords as UTF-16, i.e., two bytes per character. The effective limit is therefore 1,280 characters; the "2560 chars" in the message is misleading. - The macOS Keychain and the Linux Secret Service have no comparable limit.
Scope
- All secrets go through
store_secretinruntime/src/secret.rs. LLM, embedding, and transcription providers are affected alike. - API keys rolled out through enterprise configuration plugins fail the same way. There, the failure only appears as a warning in the log, so users never learn why the provider doesn't work.
Possible fixes
- Split long secrets across several credentials and reassemble them on read. Deleting a secret must remove all parts.
- Store the secret as UTF-8 bytes (
set_secret) instead of UTF-16 (set_password). This doubles the limit to 2,560 ASCII characters, but reading must stay compatible with existing UTF-16 entries, and it may still be too small for some tokens. - Either way: if a secret still cannot be stored, show a clear message instead of "Please try again".
Activity
SommerEngineering commentedon Oct 18, 2026
A real IONOS key has 1,712 characters. Stored as UTF-16, that's 3,424 bytes, well above the 2,560-byte limit. As UTF-8, it would fit, but longer tokens would still fail.
Decision
::part-2, so users can still recognize them in the Credential Manager.