Skip to main content
For an Inspect harness using the OpenAI provider, configure the actor at eval_async with model_base_url and model_args. Keep the source task, solver, sandbox, and scorer. Other provider protocols need a compatible adapter; changing the provider prefix can change how Inspect interprets model settings. Pass a string model identifier; an existing Model keeps its original provider and transport. This example expects one sample and a scorer named accuracy. Replace those assumptions with the source harness’s result reader. Inspect’s value_to_float() converts C to 1, I to 0, P to 0.5, and N to 0; custom labels or structured scores need their own conversion. Merge the credentials and header into any existing model_args. This adapter runs and scores a sample, then reads its score from a full sample log.
An output stopped at max_tokens or model_length keeps its native score but ends the trajectory as TRUNCATION rather than a normal completion. A managed Trajectory run selects the actor model even if the request names another model. Keep Inspect’s model identifier when it affects prompts or other behavior. Pass these transport settings through wrappers around eval_async, but configure LLM judges and other auxiliary clients separately. Changing process-wide OPENAI_API_KEY or OPENAI_BASE_URL to redirect the actor can unintentionally redirect a judge too. Store auxiliary credentials as organization secrets and pass SecretRef values in the task’s env_vars. Use credentials that remain valid when later evaluation or training runs schedule the task. If you implement an Inspect provider adapter, register it with @modelapi and obtain it with get_model(...). Its should_retry hook should honor Trajectory-Should-Retry: false on an APIStatusError response. Otherwise, keep the provider’s retry policy.