Upgrade third-party integrations from legacy runtime symbol names to canonical names after alias removal.
This playbook covers the runtime API rename in pinocchio/pkg/inference/runtime where compatibility aliases were removed. It explains what changed, how to update imports and types, and how to verify your integration after migration.
Use this guide if your code imports any of:
RuntimeComposeRequestRuntimeArtifactsRuntimeComposerRuntimeComposerFuncComposeEngineFromSettingsMiddlewareFactoryToolFactoryMiddlewareUse| Old symbol | New symbol |
|---|---|
RuntimeComposeRequest | ConversationRuntimeRequest |
RuntimeArtifacts | ComposedRuntime |
RuntimeComposer | RuntimeBuilder |
RuntimeComposerFunc | RuntimeBuilderFunc |
ComposeEngineFromSettings | BuildEngineFromSettings |
MiddlewareFactory | MiddlewareBuilder |
ToolFactory | ToolRegistrar |
MiddlewareUse | MiddlewareSpec |
The previous names leaked historical webchat terminology and were too generic in a few places. The new names make the ownership and intent explicit:
This improves API readability for downstream users and makes future runtime abstractions easier to evolve.
Before:
func build(r infruntime.RuntimeComposer) error
After:
func build(r infruntime.RuntimeBuilder) error
Before:
composer := infruntime.RuntimeComposerFunc(
func(ctx context.Context, req infruntime.RuntimeComposeRequest) (infruntime.RuntimeArtifacts, error) {
// ...
},
)
After:
composer := infruntime.RuntimeBuilderFunc(
func(ctx context.Context, req infruntime.ConversationRuntimeRequest) (infruntime.ComposedRuntime, error) {
// ...
},
)
Before:
eng, err := infruntime.ComposeEngineFromSettings(ctx, stepSettings, prompt, uses, factories)
After:
eng, err := infruntime.BuildEngineFromSettings(ctx, stepSettings, prompt, uses, factories)
Before:
uses := []infruntime.MiddlewareUse{...}
factories := map[string]infruntime.MiddlewareFactory{...}
tools := map[string]infruntime.ToolFactory{...}
After:
uses := []infruntime.MiddlewareSpec{...}
factories := map[string]infruntime.MiddlewareBuilder{...}
tools := map[string]infruntime.ToolRegistrar{...}
Run these from repository root:
rg -n "RuntimeComposeRequest|RuntimeArtifacts|RuntimeComposerFunc|RuntimeComposer|ComposeEngineFromSettings|MiddlewareFactory|ToolFactory|MiddlewareUse"
Then replace symbols in this order:
RuntimeComposeRequest, RuntimeArtifacts)RuntimeComposer, RuntimeComposerFunc)ComposeEngineFromSettings, MiddlewareFactory, ToolFactory, MiddlewareUse)go test ./pkg/inference/runtime -count=1go test ./cmd/web-chat -count=1go test ./cmd/web-chat/... -count=1go test ./... -count=1| Problem | Cause | Solution |
|---|---|---|
undefined: infruntime.RuntimeComposeRequest | Alias removed | Replace with infruntime.ConversationRuntimeRequest |
undefined: infruntime.RuntimeComposerFunc | Alias removed | Replace with infruntime.RuntimeBuilderFunc |
undefined: infruntime.ComposeEngineFromSettings | Wrapper removed | Replace with infruntime.BuildEngineFromSettings |
| Type mismatch in middleware arrays | Legacy MiddlewareUse still referenced | Change to []infruntime.MiddlewareSpec |
| Type mismatch in factory maps | Legacy MiddlewareFactory/ToolFactory still referenced | Use MiddlewareBuilder and ToolRegistrar |
pinocchio/pkg/doc/topics/webchat-backend-reference.mdpinocchio/pkg/doc/topics/webchat-framework-guide.mdpinocchio/pkg/doc/topics/webchat-http-chat-setup.md