Skip to main content

Probe LLM Provider

Overview

The admin-probe-llm-provider tool is a comprehensive diagnostic tool for testing any configured LLM provider. It supports both azure-ai-inference and azure-ai-foundry provider types, reasoning models (GPT-5.x), all sampling knobs, function calling, streaming, and a raw providerOptions escape hatch.

Tool ID: admin-probe-llm-provider

The examples use the direct runtime/operator route. Replit/Admin UI browser code should call the Admin UI BFF instead: local /admin-api/*, testing /dashboard/admin-api/*.

Use this tool to:

  • Verify a new model deployment works end-to-end before routing production traffic
  • Test parameter behavior for reasoning models (parameter stripping, reasoning effort)
  • Diagnose latency or response issues with full diagnostic output
  • Validate streaming vs. non-streaming paths independently

Input Schema

Provider Targeting

FieldTypeRequiredDescription
providerazure-ai-inference | azure-ai-foundryNoProvider type. Defaults to AZURE_DEFAULT_PROVIDER env var.
modelNamestringNoTarget model name. Resolved from DB if omitted.
deploymentNamestringNoDeployment name override.
endpointstring (URL)NoOverride the capability endpoint URL.
apiKeystringNoExplicit API key; bypasses managed identity.

Messages

FieldTypeRequiredDescription
messagesarrayNoFull message array (role, content). Takes precedence over prompt.
promptstringNoSimple user prompt shortcut.
systemstringNoSystem prompt. Injected before user messages.

Sampling Parameters

FieldTypeRequiredDescription
temperaturefloat 0–2NoSampling temperature. Automatically stripped for reasoning models.
topPfloat 0–1NoTop-P nucleus sampling. Stripped for reasoning models.
frequencyPenaltyfloat -2–2NoFrequency penalty. Stripped for reasoning models.
presencePenaltyfloat -2–2NoPresence penalty. Stripped for reasoning models.
maxOutputTokensint 1–65536NoMaximum tokens to generate.
reasoningEffortnone|minimal|low|medium|high|xhighNoReasoning depth for GPT-5.x models.

Advanced Parameters

FieldTypeRequiredDescription
seedintNoFixed seed for reproducible outputs.
stopSequencesstring[] (max 4)NoStop sequences.
responseFormat{type: "text"|"json"}NoResponse format control.
toolsarray (max 8)NoFunction calling tool definitions to test.
providerOptionsobjectNoRaw vendor-specific parameters forwarded directly (e.g. logprobs, logit_bias).

Control Flags

FieldTypeRequiredDescription
skipCapabilityValidationbooleanNoBypass DB capability check. Requires explicit provider, endpoint, and modelName.
streambooleanNoTest the streaming path instead of the non-streaming generate path.

Output Schema

The response includes three sections:

probe

Resolved provider details: provider, modelId, deployment, endpoint, resolvedProvider (db-capability | explicit-config).

request

What was actually submitted and resolved: submittedParams, resolvedParams (after reasoning model stripping), messages, messageCount, and parameterInfo (whether it is a reasoning model, which params were stripped, supported reasoning efforts).

result

The LLM response: text, content, finishReason, usage (input/output/total/reasoning/cached tokens), warnings, providerMetadata, responseMetadata, latencyMs.

Usage Examples

Basic probe (uses DB default capability)

curl -X POST "${MASTRA_BASE_URL}/admin/tools/probe-llm-provider" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${BEARER_TOKEN}" \
-d '{
"data": {
"prompt": "Say hello",
"temperature": 0.7
}
}'

Test a specific deployment

curl -X POST "${MASTRA_BASE_URL}/admin/tools/probe-llm-provider" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${BEARER_TOKEN}" \
-d '{
"data": {
"provider": "azure-ai-foundry",
"modelName": "gpt-5",
"deploymentName": "PROD-GPT5-CHAT",
"prompt": "Explain how caching works"
}
}'

Test reasoning model with effort control

curl -X POST "${MASTRA_BASE_URL}/admin/tools/probe-llm-provider" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${BEARER_TOKEN}" \
-d '{
"data": {
"modelName": "gpt-5o-reasoning",
"prompt": "Solve: x^2 - 5x + 6 = 0",
"reasoningEffort": "medium",
"maxOutputTokens": 2000
}
}'

Note: temperature, topP, frequencyPenalty, and presencePenalty are automatically stripped for reasoning models. The parameterInfo.strippedParams field in the response shows which params were removed.

Test with explicit config (bypass DB)

curl -X POST "${MASTRA_BASE_URL}/admin/tools/probe-llm-provider" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${BEARER_TOKEN}" \
-d '{
"data": {
"skipCapabilityValidation": true,
"provider": "azure-ai-inference",
"endpoint": "https://new-resource.services.ai.azure.com/",
"modelName": "gpt-4o",
"deploymentName": "TEST-GPT4O",
"prompt": "Hello",
"apiKey": "test-key"
}
}'

Environment Variables

VariableDescription
AZURE_DEFAULT_PROVIDERDefault provider when provider field is omitted
ADMIN_TEST_MODEL_NAMEDefault model name fallback (overrides MODEL_DEFAULT_MODEL_NAME)
ADMIN_TEST_MODEL_DEPLOYMENTDefault deployment fallback
MODEL_DEFAULT_MODEL_NAMESystem-wide default model name
MODEL_DEFAULT_DEPLOYMENTSystem-wide default deployment