yera.setup.write

Persist provider and model configuration produced during setup.

Symbols

def write_mcp_server_config — Write an MCP server connection to global Yera configuration.
def write_model_config — Replace model configuration for one provider connection.
def write_profile_config — Write a profile to the global Yera configuration.
def write_provider_config — Write a provider connection to the global Yera configuration.

write_mcp_server_config

write_mcp_server_config(
    server_name: str,
    config: MCPServerConfig,
) → None

Write an MCP server connection to global Yera configuration.

Parameters

server_name
type: str

Name used to enable the server in profiles.

config
type: MCPServerConfig

Typed MCP server configuration to persist.

write_model_config

write_model_config(
    provider_type: str,
    connection_name: str,
    config: list[BaseModelConfig],
) → None

Replace model configuration for one provider connection.

The caller is responsible for obtaining and validating the models before writing them. This operation performs no discovery, validation, prompting, or rendering.

Parameters

provider_type
type: str

Provider configuration key.

connection_name
type: str

Provider connection whose models are replaced.

config
type: list[BaseModelConfig]

Complete model configuration for the connection.

write_profile_config

write_profile_config(
    config: Profile,
    make_default: bool = False,
) → None

Write a profile to the global Yera configuration.

The complete profile is written in one operation after the setup flow has collected its provider connections and selected model defaults. The caller explicitly controls whether the profile becomes Yera's global default.

Parameters

config
type: Profile

Complete profile configuration to persist.

make_default
type: bool = False

Whether to make this profile the global default.

write_provider_config

write_provider_config(
    provider_type: str,
    connection_name: str,
    config: BaseConnection,
) → None

Write a provider connection to the global Yera configuration.

The caller is responsible for validating the connection before writing it. This operation performs no discovery, validation, prompting, or rendering.

Parameters

provider_type
type: str

Provider configuration key.

connection_name
type: str

Name under which the connection is stored.

config
type: BaseConnection

Typed provider connection configuration to persist.