{"record":{"id":"2af1733a61a1c382","repo":"plandex-ai/plandex","slug":"client-not-found-for-provider-composite-s-2af173","errorCode":null,"errorMessage":"client not found for provider composite: %s","messagePattern":"client not found for provider composite: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"app/server/model/client_stream.go","lineNumber":35,"sourceCode":"type OnStreamFn func(chunk string, buffer string) (shouldStop bool)\n\nfunc CreateChatCompletionWithInternalStream(\n\tclients map[string]ClientInfo,\n\tauthVars map[string]string,\n\tmodelConfig *shared.ModelRoleConfig,\n\tsettings *shared.PlanSettings,\n\torgUserConfig *shared.OrgUserConfig,\n\tcurrentOrgId string,\n\tcurrentUserId string,\n\tctx context.Context,\n\treq types.ExtendedChatCompletionRequest,\n\tonStream OnStreamFn,\n\treqStarted time.Time,\n) (*types.ModelResponse, error) {\n\tproviderComposite := modelConfig.GetProviderComposite(authVars, settings, orgUserConfig)\n\t_, ok := clients[providerComposite]\n\tif !ok {\n\t\treturn nil, fmt.Errorf(\"client not found for provider composite: %s\", providerComposite)\n\t}\n\n\tbaseModelConfig := modelConfig.GetBaseModelConfig(authVars, settings, orgUserConfig)\n\n\tresolveReq(&req, modelConfig, baseModelConfig, settings)\n\n\t// choose the fastest provider by latency/throughput on openrouter\n\tif baseModelConfig.Provider == shared.ModelProviderOpenRouter {\n\t\treq.Model += \":nitro\"\n\t}\n\n\t// Force streaming mode since we're using the streaming API\n\treq.Stream = true\n\n\t// Include usage in stream response\n\treq.StreamOptions = &openai.StreamOptions{\n\t\tIncludeUsage: true,\n\t}","sourceCodeStart":17,"sourceCodeEnd":53,"githubUrl":"https://github.com/plandex-ai/plandex/blob/e2d772072efadbe41d2946d97d79be55532dbab5/app/server/model/client_stream.go#L17-L53","documentation":"CreateChatCompletionWithInternalStream: the resolved providerComposite key is absent from the clients map, so no configured client exists for the model role's provider. Means missing API key/env var or an unsupported/unconfigured provider for this org.","triggerScenarios":"Thrown at app/server/model/client_stream.go:35 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the provider's API key env var is set (authVars)","Check plan/org model settings select a provider with a configured client","Ensure custom providers were synced for this org"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"e2d772072efadbe41d2946d97d79be55532dbab5","analyzedAt":"2026-09-05T20:56:53.631Z","contentChangedAt":"2026-09-05T20:56:53.631Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}