Guide — Custom model providers

Scope

This document summarises the steps and criteria for implementing custom model providers with the Strands Agents SDK inside Shell Sentinel. It serves as an internal checklist and complements the official documentation.

Prerequisites

Implementation flow

  1. Define configuration: create a typed ModelConfig and expose get_config/update_config.
  2. Initialise the client: resolve credentials securely, instantiate the remote client and register logging.
  3. Implement stream(...): convert inputs, adapt to StreamEvent, handle errors; use asyncio.to_thread for sync SDKs.
  4. Support tools: reuse stream in structured_output(...) with Pydantic ToolSpec conversion.
  5. Register the provider in smart_ai_sys_admin.agent and conf/agent.conf.

Additional considerations

Practical case: LM Studio

Practical case: Cerebras

External references