Custom IONOS AI Hub Provider returns 401 with valid API key

Describe the problem
I am having issues using the custom AI provider “IONOS AI Hub” through the NetBird Agent Network.

When NetBird tries to retrieve the model list from the OpenAI-compatible endpoint (/v1/models), the request returns HTTP 401 Unauthorized, although the API key is valid.

The same API key works correctly when calling the IONOS AI Hub API directly via curl using a Bearer token in the Authorization header.

The IONOS AI Hub upstream API URL is:

https://openai.inference.de-txl.ionos.com/v1

The API key is relatively long (approximately 1,713 characters). Could there be a key-length limitation in the NetBird custom provider configuration, database, Dashboard UI, proxy, or request handling? After saving the provider configuration, there is also no way to verify whether the complete key was stored and sent with outgoing requests.

To Reproduce

  1. Go to the NetBird Dashboard AI provider configuration.

  2. Create or edit a custom provider for IONOS AI Hub.

  3. Configure the provider base URL as:

    https://openai.inference.de-txl.ionos.com/v1
    
  4. Add a valid IONOS AI Hub API key (approximately 1,713 characters long).

  5. Save the provider configuration.

  6. Try to retrieve the available models from the provider.

  7. NetBird sends a request to:

    https://openai.inference.de-txl.ionos.com/v1/models
    
  8. Observe that the request returns 401 Unauthorized.

For comparison, the following direct request works successfully:

curl -H "Authorization: Bearer <IONOS_API_KEY>" \
  https://openai.inference.de-txl.ionos.com/v1/models

Expected behavior
NetBird should store the complete API key and forward it correctly in the request header:

Authorization: Bearer <API_KEY>

The request to the following endpoint should return the available model list instead of 401 Unauthorized:

https://openai.inference.de-txl.ionos.com/v1/models

Are you using NetBird Cloud?
No, I am using a self-hosted NetBird control plane.

NetBird version

  • NetBird Management / Server: 0.75.0
  • NetBird Dashboard: 2.90.7

Is any other VPN software installed?
No other VPN software is currently known to be installed / used.

Debug output
I can provide anonymized debug output and a debug bundle if required:

netbird status -dA
netbird debug for 1m -AS -U

Screenshots

Additional context

The main question is whether NetBird has a maximum supported API key length for custom AI providers.

The IONOS AI Hub API key is approximately 1,713 characters long. Since direct API calls via curl work with the exact same key and endpoint, the issue appears to be related to how NetBird stores, processes, truncates, masks, or forwards the key.

It would be helpful to know:

  • Is there a maximum supported API key length for custom providers?
  • Is the key possibly truncated when saved through the NetBird Dashboard UI or API?
  • Is there a database column size limitation?
  • Is the Authorization: Bearer ... header forwarded unchanged?
  • Is there a way to safely verify whether the full key was stored without exposing it in logs or the UI?
  • Are there known issues with OpenAI-compatible providers using very long Bearer tokens?