perf: get_provider_model_bundle use single query instead of get_confi…#34370
Open
fatelei wants to merge 2 commits intolanggenius:mainfrom
Open
perf: get_provider_model_bundle use single query instead of get_confi…#34370fatelei wants to merge 2 commits intolanggenius:mainfrom
fatelei wants to merge 2 commits intolanggenius:mainfrom
Conversation
Contributor
Pyrefly DiffNo changes detected. |
Contributor
Pyrefly DiffNo changes detected. |
Contributor
Pyrefly Diffbase → PR--- /tmp/pyrefly_base.txt 2026-04-01 03:30:42.465184343 +0000
+++ /tmp/pyrefly_pr.txt 2026-04-01 03:30:31.719206451 +0000
@@ -857,15 +857,15 @@
ERROR Argument `str | None` is not assignable to parameter `created_by` with type `SQLCoreOperations[str] | str` in function `models.model.MessageAgentThought.__init__` [bad-argument-type]
--> tests/test_containers_integration_tests/services/test_agent_service.py:800:24
ERROR Argument `Literal['account']` is not assignable to parameter `created_by_role` with type `CreatorUserRole | SQLCoreOperations[CreatorUserRole]` in function `models.model.MessageAgentThought.__init__` [bad-argument-type]
- --> tests/test_containers_integration_tests/services/test_agent_service.py:895:29
+ --> tests/test_containers_integration_tests/services/test_agent_service.py:894:29
ERROR Argument `Literal['account']` is not assignable to parameter `created_by_role` with type `CreatorUserRole | SQLCoreOperations[CreatorUserRole]` in function `models.model.MessageAgentThought.__init__` [bad-argument-type]
- --> tests/test_containers_integration_tests/services/test_agent_service.py:964:29
+ --> tests/test_containers_integration_tests/services/test_agent_service.py:963:29
ERROR Argument `str | None` is not assignable to parameter `created_by` with type `SQLCoreOperations[str] | str` in function `models.model.MessageAgentThought.__init__` [bad-argument-type]
- --> tests/test_containers_integration_tests/services/test_agent_service.py:965:24
+ --> tests/test_containers_integration_tests/services/test_agent_service.py:964:24
ERROR Argument `Literal['account']` is not assignable to parameter `created_by_role` with type `CreatorUserRole | SQLCoreOperations[CreatorUserRole]` in function `models.model.MessageAgentThought.__init__` [bad-argument-type]
- --> tests/test_containers_integration_tests/services/test_agent_service.py:1005:29
+ --> tests/test_containers_integration_tests/services/test_agent_service.py:1004:29
ERROR Argument `str | None` is not assignable to parameter `created_by` with type `SQLCoreOperations[str] | str` in function `models.model.MessageAgentThought.__init__` [bad-argument-type]
- --> tests/test_containers_integration_tests/services/test_agent_service.py:1006:24
+ --> tests/test_containers_integration_tests/services/test_agent_service.py:1005:24
ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
--> tests/test_containers_integration_tests/services/test_annotation_service.py:102:38
ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
@@ -1329,7 +1329,7 @@
ERROR No matching overload found for function `_pytest.raises.raises` called with arguments: (tuple[type[ValueError], type[StatementError]]) [no-matching-overload]
--> tests/test_containers_integration_tests/services/test_workflow_service.py:1297:27
ERROR Argument `dict[str, Any]` is not assignable to parameter `metadata` with type `Mapping[WorkflowNodeExecutionMetadataKey, Any]` in function `graphon.node_events.base.NodeRunResult.__init__` [bad-argument-type]
- --> tests/test_containers_integration_tests/services/test_workflow_service.py:1641:26
+ --> tests/test_containers_integration_tests/services/test_workflow_service.py:1642:26
ERROR Argument `Literal['active']` is not assignable to parameter `status` with type `AccountStatus | SQLCoreOperations[AccountStatus]` in function `models.account.Account.__init__` [bad-argument-type]
--> tests/test_containers_integration_tests/services/test_workspace_service.py:53:20
ERROR Argument `Literal['normal']` is not assignable to parameter `status` with type `SQLCoreOperations[TenantStatus] | TenantStatus` in function `models.account.Tenant.__init__` [bad-argument-type]
@@ -2959,13 +2959,13 @@
ERROR Argument `None` is not assignable to parameter `value` with type `Segment | dict[Unknown, Unknown] | list[Unknown]` in function `core.app.apps.common.workflow_response_converter.WorkflowResponseConverter._fetch_files_from_variable_value` [bad-argument-type]
--> tests/unit_tests/core/app/apps/common/test_workflow_response_converter.py:46:77
ERROR Argument `SimpleNamespace` is not assignable to parameter `application_generate_entity` with type `AdvancedChatAppGenerateEntity | WorkflowAppGenerateEntity` in function `core.app.apps.common.workflow_response_converter.WorkflowResponseConverter.__init__` [bad-argument-type]
- --> tests/unit_tests/core/app/apps/common/test_workflow_response_converter_human_input.py:33:37
+ --> tests/unit_tests/core/app/apps/common/test_workflow_response_converter_human_input.py:32:37
ERROR Argument `SimpleNamespace` is not assignable to parameter `user` with type `Account | EndUser` in function `core.app.apps.common.workflow_response_converter.WorkflowResponseConverter.__init__` [bad-argument-type]
- --> tests/unit_tests/core/app/apps/common/test_workflow_response_converter_human_input.py:34:14
+ --> tests/unit_tests/core/app/apps/common/test_workflow_response_converter_human_input.py:33:14
ERROR Argument `SimpleNamespace` is not assignable to parameter `application_generate_entity` with type `AdvancedChatAppGenerateEntity | WorkflowAppGenerateEntity` in function `core.app.apps.common.workflow_response_converter.WorkflowResponseConverter.__init__` [bad-argument-type]
- --> tests/unit_tests/core/app/apps/common/test_workflow_response_converter_resumption.py:32:37
+ --> tests/unit_tests/core/app/apps/common/test_workflow_response_converter_resumption.py:31:37
ERROR Argument `SimpleNamespace` is not assignable to parameter `user` with type `Account | EndUser` in function `core.app.apps.common.workflow_response_converter.WorkflowResponseConverter.__init__` [bad-argument-type]
- --> tests/unit_tests/core/app/apps/common/test_workflow_response_converter_resumption.py:33:14
+ --> tests/unit_tests/core/app/apps/common/test_workflow_response_converter_resumption.py:32:14
ERROR Object of class `NoneType` has no attribute `data` [missing-attribute]
--> tests/unit_tests/core/app/apps/common/test_workflow_response_converter_truncation.py:588:16
ERROR Argument `dict[str, dict[str, str]]` is not assignable to parameter `override_config_dict` with type `AppModelConfigDict | None` in function `core.app.apps.completion.app_config_manager.CompletionAppConfigManager.get_app_config` [bad-argument-type]
@@ -3463,13 +3463,13 @@
ERROR Argument `list[SimpleNamespace]` is not assignable to parameter `prompt_messages` with type `list[PromptMessage]` in function `core.app.features.hosting_moderation.hosting_moderation.HostingModerationFeature.check` [bad-argument-type]
--> tests/unit_tests/core/app/features/test_hosting_moderation.py:23:65
ERROR Argument `object` is not assignable to parameter `event` with type `GraphEngineEvent` in function `core.app.layers.suspend_layer.SuspendLayer.on_event` [bad-argument-type]
- --> tests/unit_tests/core/app/layers/test_suspend_layer.py:19:24
+ --> tests/unit_tests/core/app/layers/test_suspend_layer.py:18:24
ERROR Argument `SimpleNamespace` is not assignable to parameter `graph_runtime_state` with type `ReadOnlyGraphRuntimeState` in function `graphon.graph_engine.layers.base.GraphEngineLayer.initialize` [bad-argument-type]
- --> tests/unit_tests/core/app/layers/test_trigger_post_layer.py:48:30
+ --> tests/unit_tests/core/app/layers/test_trigger_post_layer.py:47:30
ERROR Argument `SimpleNamespace` is not assignable to parameter `graph_runtime_state` with type `ReadOnlyGraphRuntimeState` in function `graphon.graph_engine.layers.base.GraphEngineLayer.initialize` [bad-argument-type]
- --> tests/unit_tests/core/app/layers/test_trigger_post_layer.py:85:30
+ --> tests/unit_tests/core/app/layers/test_trigger_post_layer.py:84:30
ERROR Argument `SimpleNamespace` is not assignable to parameter `graph_runtime_state` with type `ReadOnlyGraphRuntimeState` in function `graphon.graph_engine.layers.base.GraphEngineLayer.initialize` [bad-argument-type]
- --> tests/unit_tests/core/app/layers/test_trigger_post_layer.py:105:30
+ --> tests/unit_tests/core/app/layers/test_trigger_post_layer.py:104:30
ERROR Argument `SimpleNamespace` is not assignable to parameter `application_generate_entity` with type `AppGenerateEntity` in function `core.app.task_pipeline.based_generate_task_pipeline.BasedGenerateTaskPipeline.__init__` [bad-argument-type]
--> tests/unit_tests/core/app/task_pipeline/test_based_generate_task_pipeline.py:23:41
ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
@@ -5999,13 +5999,13 @@
ERROR Cannot index into `list[dict[str, Any]]` [bad-index]
--> tests/unit_tests/core/variables/test_segment.py:491:16
ERROR Cannot set field `value` [read-only]
- --> tests/unit_tests/core/variables/test_variables.py:19:9
+ --> tests/unit_tests/core/variables/test_variables.py:20:9
ERROR Cannot set field `value` [read-only]
- --> tests/unit_tests/core/variables/test_variables.py:23:9
+ --> tests/unit_tests/core/variables/test_variables.py:24:9
ERROR Cannot set field `value` [read-only]
- --> tests/unit_tests/core/variables/test_variables.py:27:9
+ --> tests/unit_tests/core/variables/test_variables.py:28:9
ERROR Cannot set field `value` [read-only]
- --> tests/unit_tests/core/variables/test_variables.py:31:9
+ --> tests/unit_tests/core/variables/test_variables.py:32:9
ERROR Object of class `IExecutionContext` has no attribute `context_vars` [missing-attribute]
--> tests/unit_tests/core/workflow/context/test_execution_context.py:311:16
ERROR Object of class `BaseModel` has no attribute `base_url` [missing-attribute]
@@ -6069,11 +6069,11 @@
ERROR Argument `dict[str, dict[str, Any] | str]` is not assignable to parameter `config` with type `NodeConfigDict` in function `graphon.nodes.base.node.Node.__init__` [bad-argument-type]
--> tests/unit_tests/core/workflow/graph_engine/test_parallel_human_input_join_resume.py:187:16
ERROR Argument `Sequence[type[GraphEngineEvent]]` is not assignable to parameter `expected_sequence` with type `list[type[GraphEngineEvent]]` in function `TableTestRunner._validate_event_sequence` [bad-argument-type]
- --> tests/unit_tests/core/workflow/graph_engine/test_table_runner.py:403:21
+ --> tests/unit_tests/core/workflow/graph_engine/test_table_runner.py:402:21
ERROR `graph` is uninitialized [unbound-name]
- --> tests/unit_tests/core/workflow/graph_engine/test_table_runner.py:456:23
+ --> tests/unit_tests/core/workflow/graph_engine/test_table_runner.py:455:23
ERROR `graph_runtime_state` is uninitialized [unbound-name]
- --> tests/unit_tests/core/workflow/graph_engine/test_table_runner.py:457:37
+ --> tests/unit_tests/core/workflow/graph_engine/test_table_runner.py:456:37
ERROR Argument `Iterator[Unknown]` is not assignable to parameter `messages` with type `Generator[ToolInvokeMessage]` in function `core.workflow.nodes.agent.message_transformer.AgentMessageTransformer.transform` [bad-argument-type]
--> tests/unit_tests/core/workflow/nodes/agent/test_message_transformer.py:16:26
ERROR Argument `dict[str, dict[str, str] | str]` is not assignable to parameter `config` with type `NodeConfigDict` in function `graphon.nodes.base.node.Node.__init__` [bad-argument-type]
|
Contributor
Pyrefly DiffNo changes detected. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…gurations
Important
Fixes #<issue number>.Summary
fix #34367
Screenshots
Checklist
make lintandmake type-check(backend) andcd web && npx lint-staged(frontend) to appease the lint gods