From 8b231f50ffc1e2cb4de7dfddb4a971707306c23d Mon Sep 17 00:00:00 2001 From: WH-2099 Date: Mon, 6 Jul 2026 13:37:20 +0800 Subject: [PATCH 1/4] feat(api): pass app_id to plugin llm calls --- api/core/agent/cot_agent_runner.py | 1 + api/core/agent/fc_agent_runner.py | 1 + api/core/app/apps/chat/app_runner.py | 1 + api/core/app/apps/completion/app_runner.py | 1 + api/core/model_manager.py | 6 ++ api/core/plugin/impl/model.py | 6 +- api/core/plugin/impl/model_runtime.py | 5 +- api/core/workflow/node_factory.py | 11 +++- api/core/workflow/node_runtime.py | 8 ++- .../core/agent/test_cot_agent_runner.py | 2 + .../core/agent/test_fc_agent_runner.py | 2 + .../core/plugin/impl/test_model_client.py | 20 +++++++ .../core/plugin/test_model_runtime_adapter.py | 55 +++++++++++++++++++ .../core/workflow/test_node_factory.py | 1 + .../core/workflow/test_node_runtime.py | 3 +- 15 files changed, 114 insertions(+), 9 deletions(-) diff --git a/api/core/agent/cot_agent_runner.py b/api/core/agent/cot_agent_runner.py index 8fcf42ce67da3a..4d823ca79c0f0e 100644 --- a/api/core/agent/cot_agent_runner.py +++ b/api/core/agent/cot_agent_runner.py @@ -133,6 +133,7 @@ def increase_usage(final_llm_usage_dict: dict[str, LLMUsage | None], usage: LLMU stop=app_generate_entity.model_conf.stop, stream=True, callbacks=[], + request_metadata={"app_id": self.app_config.app_id}, ) usage_dict: dict[str, LLMUsage | None] = {} diff --git a/api/core/agent/fc_agent_runner.py b/api/core/agent/fc_agent_runner.py index 9db5fa08f755b3..0b92daf93a4eee 100644 --- a/api/core/agent/fc_agent_runner.py +++ b/api/core/agent/fc_agent_runner.py @@ -101,6 +101,7 @@ def increase_usage(final_llm_usage_dict: dict[str, LLMUsage | None], usage: LLMU stop=app_generate_entity.model_conf.stop, stream=self.stream_tool_call, callbacks=[], + request_metadata={"app_id": self.app_config.app_id}, ) tool_calls: list[tuple[str, str, dict[str, Any]]] = [] diff --git a/api/core/app/apps/chat/app_runner.py b/api/core/app/apps/chat/app_runner.py index 1e3be12829613c..3ee037c82c9177 100644 --- a/api/core/app/apps/chat/app_runner.py +++ b/api/core/app/apps/chat/app_runner.py @@ -232,6 +232,7 @@ def run( model_parameters=application_generate_entity.model_conf.parameters, stop=stop, stream=application_generate_entity.stream, + request_metadata={"app_id": app_config.app_id}, ) # handle invoke result diff --git a/api/core/app/apps/completion/app_runner.py b/api/core/app/apps/completion/app_runner.py index 3be70c860f9036..b9c76569ba8b2e 100644 --- a/api/core/app/apps/completion/app_runner.py +++ b/api/core/app/apps/completion/app_runner.py @@ -193,6 +193,7 @@ def run( model_parameters=application_generate_entity.model_conf.parameters, stop=stop, stream=application_generate_entity.stream, + request_metadata={"app_id": app_config.app_id}, ) # handle invoke result diff --git a/api/core/model_manager.py b/api/core/model_manager.py index 56a8f3bd98c9f9..29113ac6b2c498 100644 --- a/api/core/model_manager.py +++ b/api/core/model_manager.py @@ -124,6 +124,7 @@ def invoke_llm( stop: list[str] | None = None, stream: Literal[True] = True, callbacks: list[Callback] | None = None, + request_metadata: Mapping[str, object] | None = None, ) -> Generator: ... @overload @@ -135,6 +136,7 @@ def invoke_llm( stop: list[str] | None = None, stream: Literal[False] = False, callbacks: list[Callback] | None = None, + request_metadata: Mapping[str, object] | None = None, ) -> LLMResult: ... @overload @@ -146,6 +148,7 @@ def invoke_llm( stop: list[str] | None = None, stream: bool = True, callbacks: list[Callback] | None = None, + request_metadata: Mapping[str, object] | None = None, ) -> Union[LLMResult, Generator]: ... def invoke_llm( @@ -156,6 +159,7 @@ def invoke_llm( stop: Sequence[str] | None = None, stream: bool = True, callbacks: list[Callback] | None = None, + request_metadata: Mapping[str, object] | None = None, ) -> Union[LLMResult, Generator]: """ Invoke large language model @@ -166,6 +170,7 @@ def invoke_llm( :param stop: stop words :param stream: is stream response :param callbacks: callbacks + :param request_metadata: optional request metadata :return: full response or stream response chunk generator result """ if not isinstance(self.model_type_instance, LargeLanguageModel): @@ -182,6 +187,7 @@ def invoke_llm( stop=list(stop) if stop else None, stream=stream, callbacks=callbacks, + request_metadata=request_metadata, ), ) diff --git a/api/core/plugin/impl/model.py b/api/core/plugin/impl/model.py index 80a83fb3f2168d..c69be8a3933e6e 100644 --- a/api/core/plugin/impl/model.py +++ b/api/core/plugin/impl/model.py @@ -27,10 +27,12 @@ class PluginModelClient(BasePluginClient): @staticmethod - def _dispatch_payload(*, user_id: str | None, data: dict[str, Any]) -> dict[str, Any]: + def _dispatch_payload(*, user_id: str | None, data: dict[str, Any], app_id: str | None = None) -> dict[str, Any]: payload: dict[str, Any] = {"data": data} if user_id is not None: payload["user_id"] = user_id + if app_id is not None: + payload["app_id"] = app_id return payload def fetch_model_providers(self, tenant_id: str) -> Sequence[PluginModelProviderEntity]: @@ -166,6 +168,7 @@ def invoke_llm( tools: list[PromptMessageTool] | None = None, stop: list[str] | None = None, stream: bool = True, + app_id: str | None = None, ) -> Generator[LLMResultChunk, None, None]: """ Invoke llm @@ -188,6 +191,7 @@ def invoke_llm( "stop": stop, "stream": stream, }, + app_id=app_id, ) ), headers={ diff --git a/api/core/plugin/impl/model_runtime.py b/api/core/plugin/impl/model_runtime.py index 021d0005e85db5..57c7eda419f4e9 100644 --- a/api/core/plugin/impl/model_runtime.py +++ b/api/core/plugin/impl/model_runtime.py @@ -317,7 +317,9 @@ def invoke_llm( stream: bool, request_metadata: Mapping[str, object] | None = None, ) -> LLMResult | Generator[LLMResultChunk, None, None]: - del request_metadata + app_id = request_metadata.get("app_id") if request_metadata else None + if not isinstance(app_id, str): + app_id = None plugin_id, provider_name = self._split_provider(provider) result = self.client.invoke_llm( tenant_id=self.tenant_id, @@ -331,6 +333,7 @@ def invoke_llm( tools=tools, stop=list(stop) if stop else None, stream=stream, + app_id=app_id, ) if stream: return result diff --git a/api/core/workflow/node_factory.py b/api/core/workflow/node_factory.py index 991e79cdc61138..5b8db068d0da0b 100644 --- a/api/core/workflow/node_factory.py +++ b/api/core/workflow/node_factory.py @@ -549,7 +549,11 @@ def _build_llm_compatible_node_init_kwargs( "credentials_provider": self._llm_credentials_provider, "model_factory": self._llm_model_factory, "model_instance": ( - self._wrap_model_instance_for_node(node_data=validated_node_data, model_instance=model_instance) + self._wrap_model_instance_for_node( + node_data=validated_node_data, + model_instance=model_instance, + request_metadata={"app_id": self._dify_context.app_id}, + ) if wrap_model_instance else model_instance ), @@ -581,13 +585,14 @@ def _wrap_model_instance_for_node( *, node_data: LLMCompatibleNodeData, model_instance: ModelInstance, + request_metadata: Mapping[str, object] | None = None, ) -> DifyPreparedLLM: # Only graphon's LLM node consumes the polling protocol. Keep classifier # and extractor nodes on the existing wrapper even if the same model # advertises polling support. if node_data.type == BuiltinNodeTypes.LLM and DifyNodeFactory._supports_plugin_llm_polling(model_instance): - return DifyPreparedPollingLLM(model_instance) - return DifyPreparedLLM(model_instance) + return DifyPreparedPollingLLM(model_instance, request_metadata=request_metadata) + return DifyPreparedLLM(model_instance, request_metadata=request_metadata) @staticmethod def _supports_plugin_llm_polling(model_instance: ModelInstance) -> bool: diff --git a/api/core/workflow/node_runtime.py b/api/core/workflow/node_runtime.py index 233f404b0a4ed3..d0391b69c73b72 100644 --- a/api/core/workflow/node_runtime.py +++ b/api/core/workflow/node_runtime.py @@ -150,8 +150,9 @@ def build_from_mapping(self, *, mapping: Mapping[str, Any]): class DifyPreparedLLM(LLMProtocol): """Workflow-layer adapter that hides the full `ModelInstance` API from `graphon` nodes.""" - def __init__(self, model_instance: ModelInstance) -> None: + def __init__(self, model_instance: ModelInstance, request_metadata: Mapping[str, object] | None = None) -> None: self._model_instance = model_instance + self._request_metadata = request_metadata @property @override @@ -230,6 +231,7 @@ def invoke_llm( tools=list(tools or []), stop=list(stop or []), stream=stream, + request_metadata=self._request_metadata, ) @overload @@ -283,10 +285,10 @@ def is_structured_output_parse_error(self, error: Exception) -> bool: class DifyPreparedPollingLLM(DifyPreparedLLM, LLMPollingCapableProtocol): """Prepared workflow LLM adapter that exposes Graphon's polling protocol.""" - def __init__(self, model_instance: ModelInstance) -> None: + def __init__(self, model_instance: ModelInstance, request_metadata: Mapping[str, object] | None = None) -> None: from core.plugin.impl.model_runtime import PluginModelRuntime - super().__init__(model_instance) + super().__init__(model_instance, request_metadata=request_metadata) model_type_instance = model_instance.model_type_instance if not isinstance(model_type_instance, LargeLanguageModel): raise TypeError("Polling wrapper requires a large-language-model instance.") diff --git a/api/tests/unit_tests/core/agent/test_cot_agent_runner.py b/api/tests/unit_tests/core/agent/test_cot_agent_runner.py index 8ccc3611b9dbd9..b0886ea8d19b53 100644 --- a/api/tests/unit_tests/core/agent/test_cot_agent_runner.py +++ b/api/tests/unit_tests/core/agent/test_cot_agent_runner.py @@ -42,6 +42,7 @@ def runner(mocker: MockerFixture): application_generate_entity.invoke_from = "test" app_config = MagicMock() + app_config.app_id = "app" app_config.agent = MagicMock() app_config.agent.max_iteration = 1 app_config.prompt_template.simple_prompt_template = "Hello {{name}}" @@ -341,6 +342,7 @@ def test_run_when_no_action_branch(self, runner: DummyRunner, mocker: MockerFixt ) results = list(runner.run(runner.session, message, "query", {})) + assert runner.model_instance.invoke_llm.call_args.kwargs["request_metadata"] == {"app_id": "app"} assert results[-1].delta.message.content == "" def test_run_usage_missing_key_branch(self, runner: DummyRunner, mocker: MockerFixture): diff --git a/api/tests/unit_tests/core/agent/test_fc_agent_runner.py b/api/tests/unit_tests/core/agent/test_fc_agent_runner.py index 244dd8f6c623f6..f32ded9edff3e2 100644 --- a/api/tests/unit_tests/core/agent/test_fc_agent_runner.py +++ b/api/tests/unit_tests/core/agent/test_fc_agent_runner.py @@ -81,6 +81,7 @@ def runner(mocker: MockerFixture): mocker.patch("core.agent.fc_agent_runner.LLMResultChunkDelta", MagicMock) app_config = MagicMock() + app_config.app_id = "app" app_config.agent = MagicMock(max_iteration=2) app_config.prompt_template = MagicMock(simple_prompt_template="system") @@ -299,6 +300,7 @@ def test_run_non_streaming_no_tool_calls(self, runner: FunctionCallAgentRunner): outputs = list(runner.run(runner.session, message, "query")) assert len(outputs) == 1 + assert runner.model_instance.invoke_llm.call_args.kwargs["request_metadata"] == {"app_id": "app"} runner.queue_manager.publish.assert_called() queue_calls = runner.queue_manager.publish.call_args_list diff --git a/api/tests/unit_tests/core/plugin/impl/test_model_client.py b/api/tests/unit_tests/core/plugin/impl/test_model_client.py index ac3df1e56fcd22..c707b52ccaff12 100644 --- a/api/tests/unit_tests/core/plugin/impl/test_model_client.py +++ b/api/tests/unit_tests/core/plugin/impl/test_model_client.py @@ -156,15 +156,35 @@ def test_invoke_llm(self, mocker: MockerFixture): tools=[], stop=["STOP"], stream=False, + app_id="app-1", ) ) assert result == ["chunk-1"] call_kwargs = stream_mock.call_args.kwargs assert call_kwargs["path"] == "plugin/tenant-1/dispatch/llm/invoke" + assert call_kwargs["data"]["app_id"] == "app-1" assert call_kwargs["data"]["data"]["stream"] is False assert call_kwargs["data"]["data"]["model_parameters"] == {"temperature": 0.1} + def test_invoke_llm_omits_app_id_when_missing(self, mocker: MockerFixture): + client = PluginModelClient() + stream_mock = mocker.patch.object(client, "_request_with_plugin_daemon_response_stream", return_value=iter([])) + + list( + client.invoke_llm( + tenant_id="tenant-1", + user_id="user-1", + plugin_id="org/plugin:1", + provider="provider-a", + model="gpt-test", + credentials={}, + prompt_messages=[], + ) + ) + + assert "app_id" not in stream_mock.call_args.kwargs["data"] + def test_invoke_llm_wraps_plugin_daemon_inner_error(self, mocker: MockerFixture): client = PluginModelClient() diff --git a/api/tests/unit_tests/core/plugin/test_model_runtime_adapter.py b/api/tests/unit_tests/core/plugin/test_model_runtime_adapter.py index 7b723acc812546..b86a7ac2231313 100644 --- a/api/tests/unit_tests/core/plugin/test_model_runtime_adapter.py +++ b/api/tests/unit_tests/core/plugin/test_model_runtime_adapter.py @@ -276,8 +276,62 @@ def test_invoke_llm_resolves_plugin_fields(self) -> None: tools=None, stop=None, stream=False, + app_id=None, ) + def test_invoke_llm_forwards_string_app_id_from_request_metadata(self) -> None: + client = Mock(spec=PluginModelClient) + client.invoke_llm.return_value = iter([]) + runtime = PluginModelRuntime(tenant_id="tenant", user_id="user", client=client, plugin_service=PluginService) + + result = runtime.invoke_llm( + provider="langgenius/openai/openai", + model="gpt-4o-mini", + credentials={"api_key": "secret"}, + model_parameters={"temperature": 0.3}, + prompt_messages=[], + tools=None, + stop=None, + stream=True, + request_metadata={"app_id": "app-1"}, + ) + + assert list(result) == [] + client.invoke_llm.assert_called_once_with( + tenant_id="tenant", + user_id="user", + plugin_id="langgenius/openai", + provider="openai", + model="gpt-4o-mini", + credentials={"api_key": "secret"}, + model_parameters={"temperature": 0.3}, + prompt_messages=[], + tools=None, + stop=None, + stream=True, + app_id="app-1", + ) + + def test_invoke_llm_ignores_non_string_app_id_request_metadata(self) -> None: + client = Mock(spec=PluginModelClient) + client.invoke_llm.return_value = iter([]) + runtime = PluginModelRuntime(tenant_id="tenant", user_id="user", client=client, plugin_service=PluginService) + + result = runtime.invoke_llm( + provider="langgenius/openai/openai", + model="gpt-4o-mini", + credentials={"api_key": "secret"}, + model_parameters={"temperature": 0.3}, + prompt_messages=[], + tools=None, + stop=None, + stream=True, + request_metadata={"app_id": 123}, + ) + + assert result is client.invoke_llm.return_value + assert client.invoke_llm.call_args.kwargs["app_id"] is None + def test_invoke_llm_returns_plugin_stream_directly(self) -> None: client = Mock(spec=PluginModelClient) stream_result = iter([]) @@ -308,6 +362,7 @@ def test_invoke_llm_returns_plugin_stream_directly(self) -> None: tools=None, stop=["END"], stream=True, + app_id=None, ) def test_start_llm_polling_resolves_plugin_fields(self) -> None: diff --git a/api/tests/unit_tests/core/workflow/test_node_factory.py b/api/tests/unit_tests/core/workflow/test_node_factory.py index 6a70f2e9afbffb..e926f196192b19 100644 --- a/api/tests/unit_tests/core/workflow/test_node_factory.py +++ b/api/tests/unit_tests/core/workflow/test_node_factory.py @@ -723,6 +723,7 @@ def test_build_llm_compatible_node_init_kwargs_preserves_structured_output_switc wrap_model.assert_called_once_with( node_data=node_data, model_instance=sentinel.model_instance, + request_metadata={"app_id": "app-id"}, ) assert kwargs["model_instance"] is wrapped_model_instance diff --git a/api/tests/unit_tests/core/workflow/test_node_runtime.py b/api/tests/unit_tests/core/workflow/test_node_runtime.py index afebc6ee38aa1a..6190c7fb91ccf9 100644 --- a/api/tests/unit_tests/core/workflow/test_node_runtime.py +++ b/api/tests/unit_tests/core/workflow/test_node_runtime.py @@ -171,7 +171,7 @@ def test_dify_prepared_llm_wraps_model_instance_calls() -> None: model_schema = _build_model_schema() model_instance = _ModelInstanceStub(model_schema=model_schema) model_type_instance = model_instance.model_type_instance - prepared = DifyPreparedLLM(model_instance) + prepared = DifyPreparedLLM(model_instance, request_metadata={"app_id": "app-id"}) assert prepared.provider == "langgenius/openai/openai" assert prepared.model_name == "gpt-4o-mini" @@ -197,6 +197,7 @@ def test_dify_prepared_llm_wraps_model_instance_calls() -> None: tools=[], stop=[], stream=False, + request_metadata={"app_id": "app-id"}, ) From 3eef4af3cbeeac75bd76e6a0f25d1fe79059ccda Mon Sep 17 00:00:00 2001 From: WH-2099 Date: Mon, 6 Jul 2026 15:00:13 +0800 Subject: [PATCH 2/4] fix(api): omit empty plugin llm app_id --- api/core/plugin/impl/model_runtime.py | 30 ++++++++++--------- .../model_runtime/__mock/plugin_model.py | 1 + .../core/plugin/test_model_runtime_adapter.py | 4 +-- 3 files changed, 18 insertions(+), 17 deletions(-) diff --git a/api/core/plugin/impl/model_runtime.py b/api/core/plugin/impl/model_runtime.py index 57c7eda419f4e9..6a6660a92bb510 100644 --- a/api/core/plugin/impl/model_runtime.py +++ b/api/core/plugin/impl/model_runtime.py @@ -321,20 +321,22 @@ def invoke_llm( if not isinstance(app_id, str): app_id = None plugin_id, provider_name = self._split_provider(provider) - result = self.client.invoke_llm( - tenant_id=self.tenant_id, - user_id=self.user_id, - plugin_id=plugin_id, - provider=provider_name, - model=model, - credentials=credentials, - model_parameters=model_parameters, - prompt_messages=list(prompt_messages), - tools=tools, - stop=list(stop) if stop else None, - stream=stream, - app_id=app_id, - ) + invoke_kwargs = { + "tenant_id": self.tenant_id, + "user_id": self.user_id, + "plugin_id": plugin_id, + "provider": provider_name, + "model": model, + "credentials": credentials, + "model_parameters": model_parameters, + "prompt_messages": list(prompt_messages), + "tools": tools, + "stop": list(stop) if stop else None, + "stream": stream, + } + if app_id is not None: + invoke_kwargs["app_id"] = app_id + result = self.client.invoke_llm(**invoke_kwargs) if stream: return result diff --git a/api/tests/integration_tests/model_runtime/__mock/plugin_model.py b/api/tests/integration_tests/model_runtime/__mock/plugin_model.py index c4146d5ccdd3ab..9b2bb963d2ffab 100644 --- a/api/tests/integration_tests/model_runtime/__mock/plugin_model.py +++ b/api/tests/integration_tests/model_runtime/__mock/plugin_model.py @@ -246,5 +246,6 @@ def invoke_llm( tools: list[PromptMessageTool] | None = None, stop: list[str] | None = None, stream: bool = True, + app_id: str | None = None, ): return MockModelClass.mocked_chat_create_stream(model=model, prompt_messages=prompt_messages, tools=tools) diff --git a/api/tests/unit_tests/core/plugin/test_model_runtime_adapter.py b/api/tests/unit_tests/core/plugin/test_model_runtime_adapter.py index b86a7ac2231313..a6f80505e62b15 100644 --- a/api/tests/unit_tests/core/plugin/test_model_runtime_adapter.py +++ b/api/tests/unit_tests/core/plugin/test_model_runtime_adapter.py @@ -276,7 +276,6 @@ def test_invoke_llm_resolves_plugin_fields(self) -> None: tools=None, stop=None, stream=False, - app_id=None, ) def test_invoke_llm_forwards_string_app_id_from_request_metadata(self) -> None: @@ -330,7 +329,7 @@ def test_invoke_llm_ignores_non_string_app_id_request_metadata(self) -> None: ) assert result is client.invoke_llm.return_value - assert client.invoke_llm.call_args.kwargs["app_id"] is None + assert "app_id" not in client.invoke_llm.call_args.kwargs def test_invoke_llm_returns_plugin_stream_directly(self) -> None: client = Mock(spec=PluginModelClient) @@ -362,7 +361,6 @@ def test_invoke_llm_returns_plugin_stream_directly(self) -> None: tools=None, stop=["END"], stream=True, - app_id=None, ) def test_start_llm_polling_resolves_plugin_fields(self) -> None: From fa022d6ded7cd063c79f99b5e6d7c7d85850097d Mon Sep 17 00:00:00 2001 From: WH-2099 Date: Mon, 6 Jul 2026 15:54:27 +0800 Subject: [PATCH 3/4] fix(api): type plugin llm app_id dispatch --- api/core/plugin/impl/model_runtime.py | 45 +++++++++++++++++---------- 1 file changed, 29 insertions(+), 16 deletions(-) diff --git a/api/core/plugin/impl/model_runtime.py b/api/core/plugin/impl/model_runtime.py index 6a6660a92bb510..454bd38958ac04 100644 --- a/api/core/plugin/impl/model_runtime.py +++ b/api/core/plugin/impl/model_runtime.py @@ -321,22 +321,35 @@ def invoke_llm( if not isinstance(app_id, str): app_id = None plugin_id, provider_name = self._split_provider(provider) - invoke_kwargs = { - "tenant_id": self.tenant_id, - "user_id": self.user_id, - "plugin_id": plugin_id, - "provider": provider_name, - "model": model, - "credentials": credentials, - "model_parameters": model_parameters, - "prompt_messages": list(prompt_messages), - "tools": tools, - "stop": list(stop) if stop else None, - "stream": stream, - } - if app_id is not None: - invoke_kwargs["app_id"] = app_id - result = self.client.invoke_llm(**invoke_kwargs) + if app_id is None: + result = self.client.invoke_llm( + tenant_id=self.tenant_id, + user_id=self.user_id, + plugin_id=plugin_id, + provider=provider_name, + model=model, + credentials=credentials, + model_parameters=model_parameters, + prompt_messages=list(prompt_messages), + tools=tools, + stop=list(stop) if stop else None, + stream=stream, + ) + else: + result = self.client.invoke_llm( + tenant_id=self.tenant_id, + user_id=self.user_id, + plugin_id=plugin_id, + provider=provider_name, + model=model, + credentials=credentials, + model_parameters=model_parameters, + prompt_messages=list(prompt_messages), + tools=tools, + stop=list(stop) if stop else None, + stream=stream, + app_id=app_id, + ) if stream: return result From 745836f8933e0929077063e9cca6d7dfce3d1035 Mon Sep 17 00:00:00 2001 From: "autofix-ci[bot]" <114827586+autofix-ci[bot]@users.noreply.github.com> Date: Mon, 6 Jul 2026 08:20:34 +0000 Subject: [PATCH 4/4] [autofix.ci] apply automated fixes --- packages/contracts/generated/api/console/auth/types.gen.ts | 4 ++-- packages/contracts/generated/api/console/auth/zod.gen.ts | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/contracts/generated/api/console/auth/types.gen.ts b/packages/contracts/generated/api/console/auth/types.gen.ts index 5fe2d2450b44ac..4951cbbf9a0fc8 100644 --- a/packages/contracts/generated/api/console/auth/types.gen.ts +++ b/packages/contracts/generated/api/console/auth/types.gen.ts @@ -86,7 +86,7 @@ export type ProviderConfig = { placeholder?: I18nObject | null required?: boolean scope?: AppSelectorScope | ModelSelectorScope | ToolSelectorScope | null - type: CoreEntitiesProviderEntitiesBasicProviderConfigType + type: ProviderConfigType url?: string | null } @@ -126,7 +126,7 @@ export type ModelSelectorScope export type ToolSelectorScope = 'all' | 'builtin' | 'custom' | 'workflow' -export type CoreEntitiesProviderEntitiesBasicProviderConfigType +export type ProviderConfigType = | 'app-selector' | 'array[tools]' | 'boolean' diff --git a/packages/contracts/generated/api/console/auth/zod.gen.ts b/packages/contracts/generated/api/console/auth/zod.gen.ts index 4ba0a4a9df5a2f..b52a8f4f63acdf 100644 --- a/packages/contracts/generated/api/console/auth/zod.gen.ts +++ b/packages/contracts/generated/api/console/auth/zod.gen.ts @@ -119,9 +119,9 @@ export const zModelSelectorScope = z.enum([ export const zToolSelectorScope = z.enum(['all', 'builtin', 'custom', 'workflow']) /** - * Type + * ProviderConfigType */ -export const zCoreEntitiesProviderEntitiesBasicProviderConfigType = z.enum([ +export const zProviderConfigType = z.enum([ 'app-selector', 'array[tools]', 'boolean', @@ -146,7 +146,7 @@ export const zProviderConfig = z.object({ placeholder: zI18nObject.nullish(), required: z.boolean().optional().default(false), scope: z.union([zAppSelectorScope, zModelSelectorScope, zToolSelectorScope]).nullish(), - type: zCoreEntitiesProviderEntitiesBasicProviderConfigType, + type: zProviderConfigType, url: z.string().nullish(), })