Function: resolveTestConfig()
Makaio Framework / ai-adapters-core / resolveTestConfig
Function: resolveTestConfig()
Section titled “Function: resolveTestConfig()”resolveTestConfig<
TOptions,TBus>(options,bus,testProviderDefinition?):ResolvedTestConfig<TOptions,TBus>
Defined in: ../../../adapters/core/src/utils/resolveTestConfig.ts:72
Resolves test configuration by adding required fields (bus, agentId, adapterId, adapterName, providerContext).
When testProviderDefinition is supplied, credential refs and endpoint overrides
are built from the definition’s credentialEnvVars and endpoints — so
conformance tests can run against real providers without the full orchestrator.
Type Parameters
Section titled “Type Parameters”TOptions
Section titled “TOptions”TOptions extends CreateTestAgentOptions | undefined
TBus extends ScopedBus<string>
Parameters
Section titled “Parameters”options
Section titled “options”TOptions
Partial test agent options (undefined = empty config)
TBus
Scoped bus instance for the adapter
testProviderDefinition?
Section titled “testProviderDefinition?”Optional provider definition for credential ref building
availableModels?
Section titled “availableModels?”object[] = ...
Runtime-populated model catalog for this provider.
At boot the registry service merges lab definitions with provider-specific
overrides and injects the result here. Static provider packages and fixtures
should omit this field from ProviderDefinitionInput; the registry
service owns the content. Defaults to [] on parsed definitions so runtime
callers never need to handle undefined.
credentialEnvVars?
Section titled “credentialEnvVars?”Record<string, string> = ...
Environment variable names for credential fields.
Maps credential field names (matching the adapter’s credentialSchema keys)
to environment variable names. Used as last-resort fallback when credentials
are not provided via saved config or runtime input.
Example
`{ apiKey: 'ANTHROPIC_API_KEY' }` or `{ token: 'COPILOT_TOKEN' }`defaultModel?
Section titled “defaultModel?”string = ...
Default model identifier for general-purpose tasks (e.g., 'claude-sonnet-4-5').
Optional — providers with fully dynamic model discovery may omit this.
defaultModelFilterMode?
Section titled “defaultModelFilterMode?”"allowlist" | "show-all" = ...
Recommended default filter mode applied when a provider record is first created.
'show-all'— all models visible by default (curated providers like Anthropic).'allowlist'— all models hidden by default (firehose providers like OpenRouter).
Defaults to 'show-all' in the sync service when omitted.
description?
Section titled “description?”string = ...
Short human-readable description of the provider.
endpoints?
Section titled “endpoints?”{ anthropic?: string; openai?: string; } = ...
Wire protocol endpoints for this provider.
Maps each supported protocol to a base URL. Omit for SDK-only providers (e.g., GitHub Copilot) that communicate through a proprietary transport.
endpoints.anthropic?
Section titled “endpoints.anthropic?”string = ...
endpoints.openai?
Section titled “endpoints.openai?”string = ...
fastModel?
Section titled “fastModel?”string = ...
Fast/cheap model for cost-sensitive operations (e.g., 'claude-haiku-4-5').
Used for subagent exploration and background processing.
Falls back to defaultModel when omitted.
string = ...
Stable provider identifier used for persistence and matching (e.g., 'anthropic', 'z-ai').
Acts as the primary key across all provider-related storage and bus messages. Must be unique across all registered provider packages.
string = ...
Display name shown in the UI (e.g., 'Anthropic', 'Z.AI').
Returns
Section titled “Returns”ResolvedTestConfig<TOptions, TBus>
Complete test config with required fields injected