﻿# OpenHands saved LLM profiles mask secrets by default

OpenHands LLMProfileStore masks secret fields by default while preserving configuration shape; a portable profile file is not proof that a loaded model route has usable credentials.

Author: Retrivium editorial team
Updated: 2026-11-04
Canonical URL: https://retrivium.ai/journal/guide-openhands-profile-store-masked-secrets/
Language: en

## Inspect what a saved profile contains

The [LLM Profile Store guide](https://docs.openhands.dev/sdk/guides/llm-profile-store) saves reusable model configuration as JSON files. Its normal save masks secret fields while preserving their shape. Non-secret settings, such as a configured base URL, can remain in the artifact. A file can therefore describe the intended route accurately without containing a usable credential. Successful serialization and successful authentication are different checks.

## Choose portability and credential delivery separately

A team may want to share the model identifier and generation settings while providing credentials through its existing authorized mechanism. Do not interpret the presence of an API-key field as evidence that the real value was retained. The guide offers explicit `include_secrets=True` when actual secret persistence is intended. That changes the saved artifact's contents and should be a deliberate storage decision, rather than a blind repair copied into every example because a loaded profile could not authenticate.

## Check the consumer's profile directory

The [Oracle guide](https://docs.openhands.dev/sdk/guides/agent-ask-oracle) requires a usable profile named `oracle` and aligns its store directory with the conversation. A profile saved elsewhere does not satisfy that lookup. Diagnose the selected file and its non-secret configuration before changing credentials. A similarly named profile in another store can make an apparently corrected key irrelevant to the actual tool. Preserve the directory reference with the consuming workflow.

## Do not expect fallback to repair missing authentication

The [fallback guide](https://docs.openhands.dev/sdk/guides/llm-fallback) loads named alternative configurations but does not treat authentication failure as a transient trigger. A masked or otherwise unusable credential should therefore be diagnosed as a configuration problem, not solved by adding more fallback names. Verify that each intended consumer loads a profile with the required settings and appropriate credential delivery, while keeping real values out of diagnostic output.

## Verify the reconstructed route deliberately

Use a harmless bounded request through the intended loaded configuration and retain its outcome without recording secret values. The [response-contract guide](/journal/learn-openrouter-response-contract/) separates accepted requests from usable output; [tool observations](/journal/learn-codex-tool-observation/) identify the route actually exercised. Record which settings travel in the profile and how credentials are supplied. That makes the artifact reproducible without equating a portable JSON file with a complete working agent environment.
