hi @daya_2k
Glad it helped - and thanks for the resolved values, they pin it down exactly.
What Deep Agents reads from a pre-built BaseChatModel (deepagents/_models.py):
- provider -
model._get_ls_params()["ls_provider"]. The base BaseChatModel derives this from the class name; official integrations hardcode it ("anthropic", …). Your wrapper inherits the class-name value → 'basechataic'
- identifier - first non-empty string of
model.model_name, then model.model. Yours has neither → None
Lookup chain (_harness_profile_for_model): provider:identifier → identifier (only if it contains :) → provider alone → else default + the WARNING you saw. With provider='basechataic', identifier=None, only the provider-only step runs and looks up 'basechataic', so a profile keyed "anthropic" never matched.
Two fixes:
A) Register under the key the SDK actually derives (no model changes):
register_harness_profile("basechataic", HarnessProfile(excluded_tools=frozenset(
{"ls","read_file","write_file","edit_file","glob","grep"})))
Works via the provider-only fallback even with identifier=None. Brittle - tied to the class name.
B) Make the wrapper report a real provider + identifier (recommended):
class MyBedrockRelay(BaseChatModel):
model_name: str = "us.anthropic.claude-haiku-4-5-20251001-v1:0" # -> identifier
def _get_ls_params(self, stop=None, **kwargs):
params = super()._get_ls_params(stop=stop, **kwargs)
params["ls_provider"] = "anthropic" # -> provider
return params
Then register under "anthropic" (or the exact "anthropic:us.anthropic.claude-haiku-4-5-20251001-v1:0"). Both key shapes now resolve. (Passing a "provider:model" string would skip derivation entirely, but that’s not an option for a custom relay subclass.)
On create_agent(): perfectly valid - it doesn’t install the deep-agent harness (no filesystem/todo/subagent middleware), so there are no default tools to suppress. Use create_deep_agent + a correctly-keyed profile only when you want the harness minus a few tools.
Sources: deepagents/_models.py (get_model_provider, get_model_identifier), harness_profiles.py (_harness_profile_for_model), Deep Agents → Models.