diff --git a/README.md b/README.md index 0cbdcc7a3ef..5b7cf58f953 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,8 @@ The hidden server tools tab can retry GET requests against the broken saved reco ## Checks -regression-tests.log: 125 dashboard tests pass. backend-tests.log: 131 mapped REST endpoint tests pass. The corresponding before logs demonstrate four failing UI regressions and seven failing backend cases at the merge base +regression-tests.log: 129 dashboard tests pass. backend-tests.log: 139 mapped REST endpoint tests pass. The corresponding before logs demonstrate four failing UI regressions and ten failing backend cases at the merge base check-final.log: full make check passes, including Ruff formatting/lint, test-tree lint, strict-rule, type-discipline, test-quality, basedpyright budget, dashboard lint budgets and generated API type sync. ui-build.log: production dashboard build passes. Full backend suites are left to CI + +verify-origin.py checks live host-change credential handling. origin-boundary.json records zero UI preview requests before credential entry, followed by a successful tool list after explicit entry diff --git a/TEST-RESULTS.md b/TEST-RESULTS.md index dd73e92e128..56bd1f82f22 100644 --- a/TEST-RESULTS.md +++ b/TEST-RESULTS.md @@ -1,17 +1,18 @@ -# Local test results for LIT-7135 +# LIT-7135 verification results -- 125 affected dashboard tests passed: edit preview rules, edit form integration and existing OAuth cases, tool configuration -- Four new dashboard integration cases fail against merge base 6b721de3e530bc97758d59621e57e3a75a9ebadf: corrected Basic Auth, corrected static header, rapid URL edits with stale responses, saved-response races and reverting changes -- 131 tests passed in tests/test_litellm/proxy/_experimental/mcp_server/test_rest_endpoints.py, including seven new cases that exercise real MCP client configuration and the saved-server registry -- The seven backend regressions fail at the merge base: the client uses the saved URL, HTTP transport and Basic scheme despite the edited SSE configuration and auth choice -- Production Next.js build passed; Docker source builds compile the dashboard too -- Full Ruff, test-tree lint, strict-rule, type-discipline, test-quality and basedpyright gates passed against the merge base, in Python 3.12 with proxy-dev/e2e-dev and a generated Prisma client -- Dashboard formatting, ESLint and whole-dashboard warning budgets pass without increasing budgets +Final tip: 493c98f9bffbcf2ea1d5ba30e324427daa9a173b +Merge base: 6b721de3e530bc97758d59621e57e3a75a9ebadf -Live before/after evidence and final check logs are attached separately. The fixture is an actual MCP SDK server over HTTP, with a Basic credential or X-Preview-Key header requirement. Its rejection uses HTTP 403 so browser HTTP-auth prompts do not intercept fetch requests. No mocks or model calls are used in this live test. +129 affected dashboard tests pass. 139 tests in the mapped backend REST endpoint file pass. Four new UI integration cases fail at the merge base. The backend regression subset at the merge base has ten expected failures: seven stale connection cases and three cross-origin inherited-credential cases; five other cases pass -Final tip: 245369764e80d113e80ec8269846e5257692b8bc +Production dashboard build and both source Docker builds pass. Full make check passes all applicable gates: Ruff lint/format, test-tree lint, strict-rule, type-discipline, test-quality, basedpyright budgets, dashboard lint/budgets and generated API-type sync. No budgets or blanket suppressions were added. Existing diagnostics remain within the repository budgets -Live cases: Basic Auth correction, URL correction with inherited credential, and static-header correction all return echo before Save. Saving the corrected Basic record returns 202; real tool-list and echo tool-call both return 200. See happy-path.json +Live screenshots and sanitized network traces demonstrate Basic Auth correction, same-origin URL correction with a blank credential field, and static-header correction. Each final-tip POST returns echo and clears the stale failure before Save. Before screenshots show the same corrections leaving Unable to load tools, without preview POSTs -Additional public MCP happy path: https://learn.microsoft.com/api/mcp returned three tools; microsoft_docs_search with query Azure Functions overview returned 200 and documentation content. See public-happy-path.json +The origin-boundary run changes the hostname. The UI shows an actionable instruction and sends zero preview requests until an explicit credential is entered, then lists echo. A direct preview request with a saved ID but no explicit credential does not inherit the saved secret across hosts; an explicit credential succeeds. Unit coverage also verifies scheme changes, non-default ports and same-origin default-port normalization + +After saving corrected Basic Auth, Save returns 202, listing returns 200 with echo, and the echo tool call returns 200 with the expected message. Public Microsoft Learn MCP also returns three tools and a successful read-only documentation search on the final tip + +The fixture is an actual MCP SDK server over HTTP. It rejects invalid credentials with 403 so a browser HTTP-auth challenge does not intercept fetch requests. No mocks or model calls are used in live verification. The browser waits for the initial form load before editing fields + +Files: check-final.log, regression-tests.log, regression-before.log, backend-tests.log, backend-regression-before.log, ui-build.log, happy-path.json, public-happy-path.json, origin-boundary.json and matching before/after screenshots/network JSON diff --git a/after-auth-network.json b/after-auth-network.json index 2b92924f2c4..2cddc06a34c 100644 --- a/after-auth-network.json +++ b/after-auth-network.json @@ -1,5 +1,5 @@ { - "commit": "245369764e80d113e80ec8269846e5257692b8bc", + "commit": "493c98f9bffbcf2ea1d5ba30e324427daa9a173b", "case": "auth", "requestsAfterEdit": [ { @@ -18,14 +18,6 @@ ], "error": null, "message": "Successfully retrieved tools" - }, - { - "method": "GET", - "url": "http://localhost:47135/mcp-rest/tools/list?server_id=9b6bd048-e6c8-4501-972c-1fc1c73944bd", - "status": 403, - "tools": [], - "error": null, - "message": null } ], "visibleTools": 1, diff --git a/after-auth.png b/after-auth.png index a2b9a1d4a99..fa50e1d4be7 100644 Binary files a/after-auth.png and b/after-auth.png differ diff --git a/after-headers-network.json b/after-headers-network.json index b1bc3d73261..d4d82c9765c 100644 --- a/after-headers-network.json +++ b/after-headers-network.json @@ -1,5 +1,5 @@ { - "commit": "245369764e80d113e80ec8269846e5257692b8bc", + "commit": "493c98f9bffbcf2ea1d5ba30e324427daa9a173b", "case": "headers", "requestsAfterEdit": [ { @@ -20,14 +20,6 @@ ], "error": null, "message": "Successfully retrieved tools" - }, - { - "method": "GET", - "url": "http://localhost:47135/mcp-rest/tools/list?server_id=e9d70a72-41b3-4875-8a1e-baf4cc6fff48", - "status": 403, - "tools": [], - "error": null, - "message": null } ], "visibleTools": 1, diff --git a/after-headers.png b/after-headers.png index e9861d26c2d..f7186381e11 100644 Binary files a/after-headers.png and b/after-headers.png differ diff --git a/after-sha b/after-sha index 441338c125a..8caead57562 100644 --- a/after-sha +++ b/after-sha @@ -1 +1 @@ -245369764e80d113e80ec8269846e5257692b8bc \ No newline at end of file +493c98f9bffbcf2ea1d5ba30e324427daa9a173b diff --git a/after-url-network.json b/after-url-network.json index 66bfa1c6773..0d8151fe3a1 100644 --- a/after-url-network.json +++ b/after-url-network.json @@ -1,5 +1,5 @@ { - "commit": "245369764e80d113e80ec8269846e5257692b8bc", + "commit": "493c98f9bffbcf2ea1d5ba30e324427daa9a173b", "case": "url", "requestsAfterEdit": [ { @@ -18,14 +18,6 @@ ], "error": null, "message": "Successfully retrieved tools" - }, - { - "method": "GET", - "url": "http://localhost:47135/mcp-rest/tools/list?server_id=8bc75227-7652-4790-b16f-db47809c94b3", - "status": 500, - "tools": [], - "error": null, - "message": null } ], "visibleTools": 1, diff --git a/after-url.png b/after-url.png index 10b8a4cb079..23bbcea2594 100644 Binary files a/after-url.png and b/after-url.png differ diff --git a/backend-regression-before.log b/backend-regression-before.log index 61eee49b700..9068ee336ac 100644 --- a/backend-regression-before.log +++ b/backend-regression-before.log @@ -1,9 +1,164 @@ -FFFFFFF [100%] +FF.F....FFFFFFF [100%] =================================== FAILURES =================================== +_ TestExecuteWithMcpClient.test_static_preview_respects_origin_when_inheriting_credentials[None-http://stored.example/mcp-False] _ + +self = +monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x11bfb4f20> +url = 'http://stored.example/mcp', same_origin = False +explicit_credential = None + + @pytest.mark.parametrize( + ("url", "same_origin"), + ( + ("https://other.example/mcp", False), + ("http://stored.example/mcp", False), + ("https://stored.example:8443/mcp", False), + ("https://stored.example:443/mcp", True), + ), + ) + @pytest.mark.parametrize("explicit_credential", (None, "preview:explicit")) + def test_static_preview_respects_origin_when_inheriting_credentials( + self, monkeypatch: pytest.MonkeyPatch, url: str, same_origin: bool, explicit_credential: str | None + ) -> None: + from starlette.datastructures import Headers + + from litellm.proxy._experimental.mcp_server.mcp_server_manager import MCPServerManager + from litellm.proxy.management_endpoints import mcp_management_endpoints + + saved: Final = MCPServer( + server_id="saved-preview-server", + name="saved", + url="https://stored.example/mcp", + transport=MCPTransport.http, + auth_type=MCPAuth.basic, + authentication_token="preview:stored", + ) + manager: Final = MCPServerManager() + manager.registry = {saved.server_id: saved} + monkeypatch.setattr(rest_endpoints, "global_mcp_server_manager", manager) + monkeypatch.setattr(mcp_management_endpoints, "global_mcp_server_manager", manager) + payload: Final = NewMCPServerRequest( + server_id=saved.server_id, + url=url, + transport=MCPTransport.http, + auth_type=MCPAuth.basic, + credentials={"auth_value": explicit_credential} if explicit_credential else None, + ) + staged: Final = rest_endpoints._stage_server_test(payload, Headers()) + expected: Final = explicit_credential or ("preview:stored" if same_origin else None) +> assert staged.mcp_auth_header == expected +E AssertionError: assert 'preview:stored' == None +E + where 'preview:stored' = _StagedServerTest(request=NewMCPServerRequest(server_id='saved-preview-server', server_name=None, alias=None, descript...ne, approval_status=None, submitted_by=None, submitted_at=None), mcp_auth_header='preview:stored', oauth2_headers=None).mcp_auth_header + +tests/test_litellm/proxy/_experimental/mcp_server/test_rest_endpoints.py:195: AssertionError +---------------------------- Captured stdout setup ----------------------------- +[conftest] Module setup complete (worker: master) +_ TestExecuteWithMcpClient.test_static_preview_respects_origin_when_inheriting_credentials[None-https://other.example/mcp-False] _ + +self = +monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x11cba77a0> +url = 'https://other.example/mcp', same_origin = False +explicit_credential = None + + @pytest.mark.parametrize( + ("url", "same_origin"), + ( + ("https://other.example/mcp", False), + ("http://stored.example/mcp", False), + ("https://stored.example:8443/mcp", False), + ("https://stored.example:443/mcp", True), + ), + ) + @pytest.mark.parametrize("explicit_credential", (None, "preview:explicit")) + def test_static_preview_respects_origin_when_inheriting_credentials( + self, monkeypatch: pytest.MonkeyPatch, url: str, same_origin: bool, explicit_credential: str | None + ) -> None: + from starlette.datastructures import Headers + + from litellm.proxy._experimental.mcp_server.mcp_server_manager import MCPServerManager + from litellm.proxy.management_endpoints import mcp_management_endpoints + + saved: Final = MCPServer( + server_id="saved-preview-server", + name="saved", + url="https://stored.example/mcp", + transport=MCPTransport.http, + auth_type=MCPAuth.basic, + authentication_token="preview:stored", + ) + manager: Final = MCPServerManager() + manager.registry = {saved.server_id: saved} + monkeypatch.setattr(rest_endpoints, "global_mcp_server_manager", manager) + monkeypatch.setattr(mcp_management_endpoints, "global_mcp_server_manager", manager) + payload: Final = NewMCPServerRequest( + server_id=saved.server_id, + url=url, + transport=MCPTransport.http, + auth_type=MCPAuth.basic, + credentials={"auth_value": explicit_credential} if explicit_credential else None, + ) + staged: Final = rest_endpoints._stage_server_test(payload, Headers()) + expected: Final = explicit_credential or ("preview:stored" if same_origin else None) +> assert staged.mcp_auth_header == expected +E AssertionError: assert 'preview:stored' == None +E + where 'preview:stored' = _StagedServerTest(request=NewMCPServerRequest(server_id='saved-preview-server', server_name=None, alias=None, descript...ne, approval_status=None, submitted_by=None, submitted_at=None), mcp_auth_header='preview:stored', oauth2_headers=None).mcp_auth_header + +tests/test_litellm/proxy/_experimental/mcp_server/test_rest_endpoints.py:195: AssertionError +_ TestExecuteWithMcpClient.test_static_preview_respects_origin_when_inheriting_credentials[None-https://stored.example:8443/mcp-False] _ + +self = +monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x11cf95bb0> +url = 'https://stored.example:8443/mcp', same_origin = False +explicit_credential = None + + @pytest.mark.parametrize( + ("url", "same_origin"), + ( + ("https://other.example/mcp", False), + ("http://stored.example/mcp", False), + ("https://stored.example:8443/mcp", False), + ("https://stored.example:443/mcp", True), + ), + ) + @pytest.mark.parametrize("explicit_credential", (None, "preview:explicit")) + def test_static_preview_respects_origin_when_inheriting_credentials( + self, monkeypatch: pytest.MonkeyPatch, url: str, same_origin: bool, explicit_credential: str | None + ) -> None: + from starlette.datastructures import Headers + + from litellm.proxy._experimental.mcp_server.mcp_server_manager import MCPServerManager + from litellm.proxy.management_endpoints import mcp_management_endpoints + + saved: Final = MCPServer( + server_id="saved-preview-server", + name="saved", + url="https://stored.example/mcp", + transport=MCPTransport.http, + auth_type=MCPAuth.basic, + authentication_token="preview:stored", + ) + manager: Final = MCPServerManager() + manager.registry = {saved.server_id: saved} + monkeypatch.setattr(rest_endpoints, "global_mcp_server_manager", manager) + monkeypatch.setattr(mcp_management_endpoints, "global_mcp_server_manager", manager) + payload: Final = NewMCPServerRequest( + server_id=saved.server_id, + url=url, + transport=MCPTransport.http, + auth_type=MCPAuth.basic, + credentials={"auth_value": explicit_credential} if explicit_credential else None, + ) + staged: Final = rest_endpoints._stage_server_test(payload, Headers()) + expected: Final = explicit_credential or ("preview:stored" if same_origin else None) +> assert staged.mcp_auth_header == expected +E AssertionError: assert 'preview:stored' == None +E + where 'preview:stored' = _StagedServerTest(request=NewMCPServerRequest(server_id='saved-preview-server', server_name=None, alias=None, descript...ne, approval_status=None, submitted_by=None, submitted_at=None), mcp_auth_header='preview:stored', oauth2_headers=None).mcp_auth_header + +tests/test_litellm/proxy/_experimental/mcp_server/test_rest_endpoints.py:195: AssertionError _ TestExecuteWithMcpClient.test_static_preview_uses_edited_connection_instead_of_registered_server[api_key-edited-expected_auth4] _ -self = -monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x10dfa7e60> +self = +monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x11cf97bc0> auth_type = , auth_value = 'edited' expected_auth = {'X-API-Key': 'edited'} @@ -48,7 +203,7 @@ expected_auth = {'X-API-Key': 'edited'} payload: Final = NewMCPServerRequest( server_id=saved.server_id, server_name="edited", - url="https://edited.example/mcp", + url="https://stored.example/corrected-mcp", transport=MCPTransport.sse, auth_type=auth_type, credentials={"auth_value": auth_value} if auth_value is not None else None, @@ -66,25 +221,23 @@ expected_auth = {'X-API-Key': 'edited'} oauth2_headers=staged.oauth2_headers, ) > assert result == { - "url": "https://edited.example/mcp", + "url": "https://stored.example/corrected-mcp", "transport": MCPTransport.sse, "headers": {"X-Preview": "edited", **expected_auth}, } -E AssertionError: assert {'headers': {....example/mcp'} == {'headers': {....example/mcp'} +E AssertionError: assert {'headers': {....example/mcp'} == {'headers': {...orrected-mcp'} E E Differing items: E {'transport': } != {'transport': } +E {'url': 'https://stored.example/mcp'} != {'url': 'https://stored.example/corrected-mcp'} E {'headers': {'Authorization': 'Basic ZWRpdGVk', 'X-Preview': 'edited'}} != {'headers': {'X-API-Key': 'edited', 'X-Preview': 'edited'}} -E {'url': 'https://stored.example/mcp'} != {'url': 'https://edited.example/mcp'} E Use -v to get more diff tests/test_litellm/proxy/_experimental/mcp_server/test_rest_endpoints.py:148: AssertionError ----------------------------- Captured stdout setup ----------------------------- -[conftest] Module setup complete (worker: master) _ TestExecuteWithMcpClient.test_static_preview_uses_edited_connection_instead_of_registered_server[authorization-Custom edited-expected_auth6] _ -self = -monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x11d34d250> +self = +monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x11cf96b70> auth_type = auth_value = 'Custom edited', expected_auth = {'Authorization': 'Custom edited'} @@ -129,7 +282,7 @@ auth_value = 'Custom edited', expected_auth = {'Authorization': 'Custom edited'} payload: Final = NewMCPServerRequest( server_id=saved.server_id, server_name="edited", - url="https://edited.example/mcp", + url="https://stored.example/corrected-mcp", transport=MCPTransport.sse, auth_type=auth_type, credentials={"auth_value": auth_value} if auth_value is not None else None, @@ -147,23 +300,23 @@ auth_value = 'Custom edited', expected_auth = {'Authorization': 'Custom edited'} oauth2_headers=staged.oauth2_headers, ) > assert result == { - "url": "https://edited.example/mcp", + "url": "https://stored.example/corrected-mcp", "transport": MCPTransport.sse, "headers": {"X-Preview": "edited", **expected_auth}, } -E AssertionError: assert {'headers': {....example/mcp'} == {'headers': {....example/mcp'} +E AssertionError: assert {'headers': {....example/mcp'} == {'headers': {...orrected-mcp'} E E Differing items: E {'transport': } != {'transport': } +E {'url': 'https://stored.example/mcp'} != {'url': 'https://stored.example/corrected-mcp'} E {'headers': {'Authorization': 'Basic Q3VzdG9tIGVkaXRlZA==', 'X-Preview': 'edited'}} != {'headers': {'Authorization': 'Custom edited', 'X-Preview': 'edited'}} -E {'url': 'https://stored.example/mcp'} != {'url': 'https://edited.example/mcp'} E Use -v to get more diff tests/test_litellm/proxy/_experimental/mcp_server/test_rest_endpoints.py:148: AssertionError _ TestExecuteWithMcpClient.test_static_preview_uses_edited_connection_instead_of_registered_server[basic-None-expected_auth2] _ -self = -monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x11a4aaf30> +self = +monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x11cf3c080> auth_type = , auth_value = None expected_auth = {'Authorization': 'Basic cHJldmlldzpzdG9yZWQ='} @@ -208,7 +361,7 @@ expected_auth = {'Authorization': 'Basic cHJldmlldzpzdG9yZWQ='} payload: Final = NewMCPServerRequest( server_id=saved.server_id, server_name="edited", - url="https://edited.example/mcp", + url="https://stored.example/corrected-mcp", transport=MCPTransport.sse, auth_type=auth_type, credentials={"auth_value": auth_value} if auth_value is not None else None, @@ -226,23 +379,23 @@ expected_auth = {'Authorization': 'Basic cHJldmlldzpzdG9yZWQ='} oauth2_headers=staged.oauth2_headers, ) > assert result == { - "url": "https://edited.example/mcp", + "url": "https://stored.example/corrected-mcp", "transport": MCPTransport.sse, "headers": {"X-Preview": "edited", **expected_auth}, } -E AssertionError: assert {'headers': {....example/mcp'} == {'headers': {....example/mcp'} +E AssertionError: assert {'headers': {....example/mcp'} == {'headers': {...orrected-mcp'} E E Omitting 1 identical items, use -vv to show E Differing items: E {'transport': } != {'transport': } -E {'url': 'https://stored.example/mcp'} != {'url': 'https://edited.example/mcp'} +E {'url': 'https://stored.example/mcp'} != {'url': 'https://stored.example/corrected-mcp'} E Use -v to get more diff tests/test_litellm/proxy/_experimental/mcp_server/test_rest_endpoints.py:148: AssertionError _ TestExecuteWithMcpClient.test_static_preview_uses_edited_connection_instead_of_registered_server[basic-preview:correct-expected_auth1] _ -self = -monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x11cbc4ce0> +self = +monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x11cf97ce0> auth_type = , auth_value = 'preview:correct' expected_auth = {'Authorization': 'Basic cHJldmlldzpjb3JyZWN0'} @@ -287,7 +440,7 @@ expected_auth = {'Authorization': 'Basic cHJldmlldzpjb3JyZWN0'} payload: Final = NewMCPServerRequest( server_id=saved.server_id, server_name="edited", - url="https://edited.example/mcp", + url="https://stored.example/corrected-mcp", transport=MCPTransport.sse, auth_type=auth_type, credentials={"auth_value": auth_value} if auth_value is not None else None, @@ -305,23 +458,23 @@ expected_auth = {'Authorization': 'Basic cHJldmlldzpjb3JyZWN0'} oauth2_headers=staged.oauth2_headers, ) > assert result == { - "url": "https://edited.example/mcp", + "url": "https://stored.example/corrected-mcp", "transport": MCPTransport.sse, "headers": {"X-Preview": "edited", **expected_auth}, } -E AssertionError: assert {'headers': {....example/mcp'} == {'headers': {....example/mcp'} +E AssertionError: assert {'headers': {....example/mcp'} == {'headers': {...orrected-mcp'} E E Omitting 1 identical items, use -vv to show E Differing items: E {'transport': } != {'transport': } -E {'url': 'https://stored.example/mcp'} != {'url': 'https://edited.example/mcp'} +E {'url': 'https://stored.example/mcp'} != {'url': 'https://stored.example/corrected-mcp'} E Use -v to get more diff tests/test_litellm/proxy/_experimental/mcp_server/test_rest_endpoints.py:148: AssertionError _ TestExecuteWithMcpClient.test_static_preview_uses_edited_connection_instead_of_registered_server[bearer_token-edited-expected_auth3] _ -self = -monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x11cab6450> +self = +monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x11cf97770> auth_type = , auth_value = 'edited' expected_auth = {'Authorization': 'Bearer edited'} @@ -366,7 +519,7 @@ expected_auth = {'Authorization': 'Bearer edited'} payload: Final = NewMCPServerRequest( server_id=saved.server_id, server_name="edited", - url="https://edited.example/mcp", + url="https://stored.example/corrected-mcp", transport=MCPTransport.sse, auth_type=auth_type, credentials={"auth_value": auth_value} if auth_value is not None else None, @@ -384,23 +537,23 @@ expected_auth = {'Authorization': 'Bearer edited'} oauth2_headers=staged.oauth2_headers, ) > assert result == { - "url": "https://edited.example/mcp", + "url": "https://stored.example/corrected-mcp", "transport": MCPTransport.sse, "headers": {"X-Preview": "edited", **expected_auth}, } -E AssertionError: assert {'headers': {....example/mcp'} == {'headers': {....example/mcp'} +E AssertionError: assert {'headers': {....example/mcp'} == {'headers': {...orrected-mcp'} E E Differing items: E {'transport': } != {'transport': } +E {'url': 'https://stored.example/mcp'} != {'url': 'https://stored.example/corrected-mcp'} E {'headers': {'Authorization': 'Basic ZWRpdGVk', 'X-Preview': 'edited'}} != {'headers': {'Authorization': 'Bearer edited', 'X-Preview': 'edited'}} -E {'url': 'https://stored.example/mcp'} != {'url': 'https://edited.example/mcp'} E Use -v to get more diff tests/test_litellm/proxy/_experimental/mcp_server/test_rest_endpoints.py:148: AssertionError _ TestExecuteWithMcpClient.test_static_preview_uses_edited_connection_instead_of_registered_server[none-None-expected_auth0] _ -self = -monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x11cab7a40> +self = +monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x11cf96060> auth_type = , auth_value = None, expected_auth = {} @pytest.mark.asyncio @@ -444,7 +597,7 @@ auth_type = , auth_value = None, expected_auth = {} payload: Final = NewMCPServerRequest( server_id=saved.server_id, server_name="edited", - url="https://edited.example/mcp", + url="https://stored.example/corrected-mcp", transport=MCPTransport.sse, auth_type=auth_type, credentials={"auth_value": auth_value} if auth_value is not None else None, @@ -462,23 +615,23 @@ auth_type = , auth_value = None, expected_auth = {} oauth2_headers=staged.oauth2_headers, ) > assert result == { - "url": "https://edited.example/mcp", + "url": "https://stored.example/corrected-mcp", "transport": MCPTransport.sse, "headers": {"X-Preview": "edited", **expected_auth}, } -E AssertionError: assert {'headers': {....example/mcp'} == {'headers': {....example/mcp'} +E AssertionError: assert {'headers': {....example/mcp'} == {'headers': {...orrected-mcp'} E E Omitting 1 identical items, use -vv to show E Differing items: E {'transport': } != {'transport': } -E {'url': 'https://stored.example/mcp'} != {'url': 'https://edited.example/mcp'} +E {'url': 'https://stored.example/mcp'} != {'url': 'https://stored.example/corrected-mcp'} E Use -v to get more diff tests/test_litellm/proxy/_experimental/mcp_server/test_rest_endpoints.py:148: AssertionError _ TestExecuteWithMcpClient.test_static_preview_uses_edited_connection_instead_of_registered_server[token-edited-expected_auth5] _ -self = -monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x11cab4cb0> +self = +monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x11cf3fa40> auth_type = , auth_value = 'edited' expected_auth = {'Authorization': 'token edited'} @@ -523,7 +676,7 @@ expected_auth = {'Authorization': 'token edited'} payload: Final = NewMCPServerRequest( server_id=saved.server_id, server_name="edited", - url="https://edited.example/mcp", + url="https://stored.example/corrected-mcp", transport=MCPTransport.sse, auth_type=auth_type, credentials={"auth_value": auth_value} if auth_value is not None else None, @@ -541,16 +694,16 @@ expected_auth = {'Authorization': 'token edited'} oauth2_headers=staged.oauth2_headers, ) > assert result == { - "url": "https://edited.example/mcp", + "url": "https://stored.example/corrected-mcp", "transport": MCPTransport.sse, "headers": {"X-Preview": "edited", **expected_auth}, } -E AssertionError: assert {'headers': {....example/mcp'} == {'headers': {....example/mcp'} +E AssertionError: assert {'headers': {....example/mcp'} == {'headers': {...orrected-mcp'} E E Differing items: E {'transport': } != {'transport': } +E {'url': 'https://stored.example/mcp'} != {'url': 'https://stored.example/corrected-mcp'} E {'headers': {'X-Preview': 'edited'}} != {'headers': {'Authorization': 'token edited', 'X-Preview': 'edited'}} -E {'url': 'https://stored.example/mcp'} != {'url': 'https://edited.example/mcp'} E Use -v to get more diff tests/test_litellm/proxy/_experimental/mcp_server/test_rest_endpoints.py:148: AssertionError @@ -575,6 +728,9 @@ tests/test_litellm/proxy/_experimental/mcp_server/test_rest_endpoints.py:148: As -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info ============================ +FAILED tests/test_litellm/proxy/_experimental/mcp_server/test_rest_endpoints.py::TestExecuteWithMcpClient::test_static_preview_respects_origin_when_inheriting_credentials[None-http://stored.example/mcp-False] +FAILED tests/test_litellm/proxy/_experimental/mcp_server/test_rest_endpoints.py::TestExecuteWithMcpClient::test_static_preview_respects_origin_when_inheriting_credentials[None-https://other.example/mcp-False] +FAILED tests/test_litellm/proxy/_experimental/mcp_server/test_rest_endpoints.py::TestExecuteWithMcpClient::test_static_preview_respects_origin_when_inheriting_credentials[None-https://stored.example:8443/mcp-False] FAILED tests/test_litellm/proxy/_experimental/mcp_server/test_rest_endpoints.py::TestExecuteWithMcpClient::test_static_preview_uses_edited_connection_instead_of_registered_server[api_key-edited-expected_auth4] FAILED tests/test_litellm/proxy/_experimental/mcp_server/test_rest_endpoints.py::TestExecuteWithMcpClient::test_static_preview_uses_edited_connection_instead_of_registered_server[authorization-Custom edited-expected_auth6] FAILED tests/test_litellm/proxy/_experimental/mcp_server/test_rest_endpoints.py::TestExecuteWithMcpClient::test_static_preview_uses_edited_connection_instead_of_registered_server[basic-None-expected_auth2] @@ -582,4 +738,4 @@ FAILED tests/test_litellm/proxy/_experimental/mcp_server/test_rest_endpoints.py: FAILED tests/test_litellm/proxy/_experimental/mcp_server/test_rest_endpoints.py::TestExecuteWithMcpClient::test_static_preview_uses_edited_connection_instead_of_registered_server[bearer_token-edited-expected_auth3] FAILED tests/test_litellm/proxy/_experimental/mcp_server/test_rest_endpoints.py::TestExecuteWithMcpClient::test_static_preview_uses_edited_connection_instead_of_registered_server[none-None-expected_auth0] FAILED tests/test_litellm/proxy/_experimental/mcp_server/test_rest_endpoints.py::TestExecuteWithMcpClient::test_static_preview_uses_edited_connection_instead_of_registered_server[token-edited-expected_auth5] -7 failed, 124 deselected, 4 warnings in 2.97s +10 failed, 5 passed, 124 deselected, 4 warnings in 3.99s diff --git a/backend-tests.log b/backend-tests.log index b8b0833f5fb..1d46d194842 100644 --- a/backend-tests.log +++ b/backend-tests.log @@ -1,5 +1,5 @@ -........................................................................ [ 54%] -........................................................... [100%] +........................................................................ [ 51%] +................................................................... [100%] =============================== warnings summary =============================== .venv/lib/python3.12/site-packages/fastapi/testclient.py:1 /Users/jvalluru/LiteLLM-work/litellm-lit-7135/.venv/lib/python3.12/site-packages/fastapi/testclient.py:1: StarletteDeprecationWarning: Using `httpx` with `starlette.testclient` is deprecated; install `httpx2` instead. @@ -18,4 +18,4 @@ warnings.warn( -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html -131 passed, 4 warnings in 2.52s +139 passed, 4 warnings in 3.38s diff --git a/capture.py b/capture.py index 50956637414..530a214d646 100644 --- a/capture.py +++ b/capture.py @@ -17,6 +17,7 @@ async def main(): await page.get_by_title('preview_' + case, exact=True).click() await page.get_by_role('tab', name='Settings', exact=True).click() await expect(page.get_by_text('Unable to load tools', exact=True)).to_be_visible(timeout=30000) + await page.wait_for_timeout(1500) records = [] issued = set() def note_request(request): diff --git a/check-final.log b/check-final.log index d955aa84541..b960a799aff 100644 --- a/check-final.log +++ b/check-final.log @@ -1,15 +1,4 @@ -uv sync --inexact --frozen --extra proxy --group proxy-dev --group e2e-dev -Checked 232 packages in 37ms -uv run --no-sync python scripts/prisma_generate_if_needed.py -Prisma client already generated for litellm/proxy/schema.prisma (prisma 0.11.0); skipping prisma generate -cd ui/litellm-dashboard && ../../scripts/with_dashboard_node.sh npm install --no-audit --no-fund - -up to date in 541ms -bootstrap: .env left untouched -bootstrap: done -./scripts/pre_commit_lint.sh -check: logging full output to /Users/jvalluru/LiteLLM-work/litellm/.git/worktrees/litellm-lit-7135/pre_commit_lint.log -check: nothing staged; scoping to the working tree's diff against the merge base with 6b721de3e5: +check: nothing staged; scoping to the working tree's diff against the merge base with 6b721de3e530bc97758d59621e57e3a75a9ebadf: litellm/proxy/_experimental/mcp_server/rest_endpoints.py tests/test_litellm/proxy/_experimental/mcp_server/test_rest_endpoints.py ui/litellm-dashboard/src/app/(dashboard)/mcp-servers/_components/editToolPreview.test.ts @@ -19,26 +8,26 @@ check: nothing staged; scoping to the working tree's diff against the merge base ui/litellm-dashboard/src/app/(dashboard)/mcp-servers/_components/mcp_tool_configuration.tsx check: linting Python (make lint) uv sync --inexact --frozen --group proxy-dev --group e2e-dev -Checked 205 packages in 6ms +Checked 205 packages in 5ms uv run --no-sync python scripts/prisma_generate_if_needed.py Prisma client already generated for litellm/proxy/schema.prisma (prisma 0.11.0); skipping prisma generate cd litellm && uv run --no-sync ruff check . && cd .. -uv run --no-sync python scripts/ruff_strict_gate.py --base "6b721de3e5" -uv run --no-sync python scripts/type_discipline_gate.py --base "6b721de3e5" -uv run --no-sync python scripts/test_quality_gate.py --base "6b721de3e5" -uv run --no-sync python scripts/type_check_gate.py --base "6b721de3e5" +uv run --no-sync python scripts/ruff_strict_gate.py --base "6b721de3e530bc97758d59621e57e3a75a9ebadf" +uv run --no-sync python scripts/type_discipline_gate.py --base "6b721de3e530bc97758d59621e57e3a75a9ebadf" +uv run --no-sync python scripts/test_quality_gate.py --base "6b721de3e530bc97758d59621e57e3a75a9ebadf" +uv run --no-sync python scripts/type_check_gate.py --base "6b721de3e530bc97758d59621e57e3a75a9ebadf" uv run --no-sync basedpyright tests/e2e cd litellm && uv run --no-sync python ../tests/documentation_tests/test_circular_imports.py && cd .. No LiteLLM type hints found. -All checks passed! -uv run --no-sync ruff check --config ruff-tests.toml tests 1 file already formatted All checks passed! +uv run --no-sync ruff check --config ruff-tests.toml tests +All checks passed! [from litellm import *] OK! no issues! -OK: every strict rule is within its codebase ceiling (base 6b721de3e5) +OK: every strict rule is within its codebase ceiling (base 6b721de3e530bc97758d59621e57e3a75a9ebadf) 0 errors, 0 warnings, 0 notes -OK: every TQ rule is within its test-suite ceiling (base 6b721de3e5) -OK: every LIT rule is within its codebase ceiling (base 6b721de3e5) +OK: every TQ rule is within its test-suite ceiling (base 6b721de3e530bc97758d59621e57e3a75a9ebadf) +OK: every LIT rule is within its codebase ceiling (base 6b721de3e530bc97758d59621e57e3a75a9ebadf) OK: every rule is within its basedpyright limit or no higher than base (137959 errors total) check: ruff format --check (scoped litellm files) 1 file already formatted @@ -55,22 +44,22 @@ All matched files use Prettier code style! 254:23 warning Object literal with 6 properties passed inline as an argument; assign it to a named variable first local/no-large-inline-object-arg 448:62 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any 451:6 warning React Hook useEffect has a missing dependency: 'form'. Either include it or remove the dependency array react-hooks/exhaustive-deps - 585:55 warning Async arrow function has a complexity of 25. Maximum allowed is 20 complexity - 680:28 warning Object literal with 5 properties passed inline as an argument; assign it to a named variable first local/no-large-inline-object-arg - 705:26 warning Compilation Skipped: Use of incompatible library + 588:55 warning Async arrow function has a complexity of 25. Maximum allowed is 20 complexity + 683:28 warning Object literal with 5 properties passed inline as an argument; assign it to a named variable first local/no-large-inline-object-arg + 708:26 warning Compilation Skipped: Use of incompatible library This API returns functions which cannot be memoized without leading to stale UI. To prevent this, by default React Compiler will skip memoizing this component/hook. However, you may see issues if values from this API are passed to other components/hooks that are memoized. -/Users/jvalluru/LiteLLM-work/litellm-lit-7135/ui/litellm-dashboard/src/app/(dashboard)/mcp-servers/_components/mcp_server_edit.tsx:705:26 - 703 | - 704 | React.useEffect(() => { -> 705 | const subscription = form.watch((values, { name, type }) => { +/Users/jvalluru/LiteLLM-work/litellm-lit-7135/ui/litellm-dashboard/src/app/(dashboard)/mcp-servers/_components/mcp_server_edit.tsx:708:26 + 706 | + 707 | React.useEffect(() => { +> 708 | const subscription = form.watch((values, { name, type }) => { | ^^^^ React Hook Form's `useForm()` API returns a `watch()` function which cannot be memoized safely. - 706 | if (type !== "change" || name === undefined) { - 707 | return; - 708 | } react-hooks/incompatible-library - 725:52 warning Object literal with 9 properties passed inline as an argument; assign it to a named variable first local/no-large-inline-object-arg - 782:21 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 709 | if (type !== "change" || name === undefined) { + 710 | return; + 711 | } react-hooks/incompatible-library + 728:52 warning Object literal with 9 properties passed inline as an argument; assign it to a named variable first local/no-large-inline-object-arg + 785:21 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any /Users/jvalluru/LiteLLM-work/litellm-lit-7135/ui/litellm-dashboard/src/app/(dashboard)/mcp-servers/_components/mcp_tool_configuration.tsx 22:30 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any @@ -106,7 +95,7 @@ wrote 33 feature fragments to /Users/jvalluru/LiteLLM-work/litellm-lit-7135/lite > node scripts/gen-api-types.mjs ✨ openapi-typescript 7.13.0 -🚀 /var/folders/n4/7jf8qfys5256pzfjlkkcmzj80000gn/T/litellm-openapi-qqevN5/openapi.json → /Users/jvalluru/LiteLLM-work/litellm-lit-7135/ui/litellm-dashboard/src/lib/http/schema.d.ts [690.2ms] +🚀 /var/folders/n4/7jf8qfys5256pzfjlkkcmzj80000gn/T/litellm-openapi-EyadgS/openapi.json → /Users/jvalluru/LiteLLM-work/litellm-lit-7135/ui/litellm-dashboard/src/lib/http/schema.d.ts [620.9ms] check: summary ran: Python lint (make lint) skipped: tests/e2e checks (basedpyright + raw HTTP client ban) (no tests/e2e Python files in scope) @@ -114,4 +103,4 @@ check: summary ran: dashboard lint (prettier + eslint + lint budgets) ran: dashboard API-type sync (npm run gen:api) check: PASS -check: full log: /Users/jvalluru/LiteLLM-work/litellm/.git/worktrees/litellm-lit-7135/pre_commit_lint.log + diff --git a/happy-path.json b/happy-path.json index c0b1c5fac6e..66330989a57 100644 --- a/happy-path.json +++ b/happy-path.json @@ -1,5 +1,5 @@ { - "commit": "245369764e80d113e80ec8269846e5257692b8bc", + "commit": "493c98f9bffbcf2ea1d5ba30e324427daa9a173b", "saveStatus": 202, "listStatus": 200, "tools": [ diff --git a/image-provenance.json b/image-provenance.json index d19bc1b4ae3..c7822cf8791 100644 --- a/image-provenance.json +++ b/image-provenance.json @@ -20,13 +20,13 @@ "tags": [ "litellm-7135:after" ], - "id": "sha256:f061712316ab2897b57ea858626a9d6a433118319ce217f28f4ab4d6cc81fcc1", + "id": "sha256:e2d166e9ad70880c9627b224171a5bfa5152d87e9af821f1891da8e1b7bf54fd", "labels": { "dev.chainguard.image.title": "wolfi-base", "dev.chainguard.package.main": "", "org.opencontainers.image.authors": "Chainguard Team https://www.chainguard.dev/", "org.opencontainers.image.created": "2026-08-30T12:58:50Z", - "org.opencontainers.image.revision": "245369764e80d113e80ec8269846e5257692b8bc", + "org.opencontainers.image.revision": "493c98f9bf", "org.opencontainers.image.source": "https://github.com/chainguard-images/images/tree/main/images/wolfi-base", "org.opencontainers.image.title": "wolfi-base", "org.opencontainers.image.url": "https://images.chainguard.dev/directory/image/wolfi-base/overview", diff --git a/origin-boundary.json b/origin-boundary.json new file mode 100644 index 00000000000..df40d7ccbf6 --- /dev/null +++ b/origin-boundary.json @@ -0,0 +1,19 @@ +{ + "commit": "493c98f9bffbcf2ea1d5ba30e324427daa9a173b", + "withoutExplicitCredential": { + "status": 200, + "toolCount": 0 + }, + "withExplicitCredential": { + "status": 200, + "tools": [ + "echo" + ] + }, + "ui": { + "guardVisible": true, + "requestsBeforeCredential": 0, + "requestsAfterCredential": 1, + "toolVisible": "echo" + } +} \ No newline at end of file diff --git a/public-happy-path.json b/public-happy-path.json index 90561593d94..f229528144c 100644 --- a/public-happy-path.json +++ b/public-happy-path.json @@ -1,5 +1,5 @@ { - "commit": "245369764e80d113e80ec8269846e5257692b8bc", + "commit": "493c98f9bffbcf2ea1d5ba30e324427daa9a173b", "upstream": "https://learn.microsoft.com/api/mcp", "listStatus": 200, "tools": [ @@ -20,7 +20,7 @@ "content": [ { "type": "text", - "text": "{\"results\":[{\"title\":\"Azure SQL bindings for Azure Functions overview (programming-language-csharp)\",\"content\":\"# Azure SQL bindings for Azure Functions overview (programming-language-csharp)\\n## Samples\\nIn addition to the samples for C#, Java, JavaScript, PowerShell, and Python available in the [Azure SQL bindings GitHub repository](https://github.com/Azure/azure-functions-sql-extension/tree/main/samples), more are available in Azure Samples:\\n1. [ToDo API sample with Azure SQL bindings (C#)](https://learn.microsoft.com/en-us/samples/azure-samples/azure-sql-binding-func-dotnet-todo/todo-backend-dotnet-azure-sql-bindings-azure-functions/)\\n2. [Use SQL bindings in Azure Stream Analytics](https://learn.microsoft.com/azure/stream-analytics/sql-database-upsert#option-1-update-by-key-with-the-azure-function-sql-binding)\\n# Azure SQL bindings for Azure Functions overview (programming-language-javascript)\\nThis set of articles explains how to work with [Azure SQL](https://learn.microsoft.com/en-us/azure/azure-sql/index) bindings in Azure Functions. Azure Functions supports input bindings, output bindings, and a function trigger for the Azure SQL and SQL Server products.\\n| Action | Type| \\n| --- | --- |\\n| Trigger a function when a change is detected on a SQL table | [SQL trigger](https://learn.microsoft.com/azure/azure-functions/functions-bindings-azure-sql-trigger) |\\n| Read data from a database | [Input binding](https://learn.microsoft.com/azure/azure-functions/functions-bindings-azure-sql-input) |\\n| Save data to a database | [Output binding](https://learn.microsoft.com/azure/azure-functions/functions-bindings-azure-sql-output) |\\n\",\"contentUrl\":\"https://learn.microsoft.com/azure/azure-functions/functions-bindings-azure-sql#samples\"},{\"title\":\"Azure SQL bindings for Azure Functions overview (programming-language-javascript)\",\"content\":\"# Azure SQL bindings for Azure Functions overview (programming-language-javascript)\\n## Samples\\nIn addition to the samples for C#, Java, JavaScript, PowerShell, and Python available in the [Azure SQL bindings GitHub repository](https://github.com/Azure/azure-functions-sql-extension/tree/main/samples), more are available in Azure Samples:\\n1. [ToDo API sample with Azure SQL bindings (C#)](https://learn.microsoft.com/en-us/samples/azure-samples/azure-sql-binding-func-dotnet-todo/todo-backend-dotnet-azure-sql-bindings-azure-functions/)\\n2. [Use SQL bindings in Azure Stream Analytics](https://learn.microsoft.com/azure/stream-analytics/sql-database-upsert#option-1-update-by-key-with-the-azure-function-sql-binding)\\n# Azure SQL bindings for Azure Functions overview (programming-language-powershell)\\nThis set of articles explains how to work with [Azure SQL](https://learn.microsoft.com/en-us/azure/azure-sql/index) bindings in Azure Functions. Azure Functions supports input bindings, output bindings, and a function trigger for the Azure SQL and SQL Server products.\\n| Action | Type| \\n| --- | --- |\\n| Trigger a function when a change is detected on a SQL table | [SQL trigger](https://learn.microsoft.com/azure/azure-functions/functions-bindings-azure-sql-trigger) |\\n| Read data from a database | [Input binding](https://learn.microsoft.com/azure/azure-functions/functions-bindings-azure-sql-input) |\\n| Save data to a database | [Output binding](https://learn.microsoft.com/azure/azure-functions/functions-bindings-azure-sql-output) |\\n\",\"contentUrl\":\"https://learn.microsoft.com/azure/azure-functions/functions-bindings-azure-sql#samples\"},{\"title\":\"Azure SQL bindings for Azure Functions overview (programming-language-python)\",\"content\":\"# Azure SQL bindings for Azure Functions overview (programming-language-python)\\n## Samples\\nIn addition to the samples for C#, Java, JavaScript, PowerShell, and Python available in the [Azure SQL bindings GitHub repository](https://github.com/Azure/azure-functions-sql-extension/tree/main/samples), more are available in Azure Samples:\\n1. [ToDo API sample with Azure SQL bindings (C#)](https://learn.microsoft.com/en-us/samples/azure-samples/azure-sql-binding-func-dotnet-todo/todo-backend-dotnet-azure-sql-bindings-azure-functions/)\\n2. [Use SQL bindings in Azure Stream Analytics](https://learn.microsoft.com/azure/stream-analytics/sql-database-upsert#option-1-update-by-key-with-the-azure-function-sql-binding)\\n# Azure SQL bindings for Azure Functions overview (programming-language-java)\\nThis set of articles explains how to work with [Azure SQL](https://learn.microsoft.com/en-us/azure/azure-sql/index) bindings in Azure Functions. Azure Functions supports input bindings, output bindings, and a function trigger for the Azure SQL and SQL Server products.\\n| Action | Type| \\n| --- | --- |\\n| Trigger a function when a change is detected on a SQL table | [SQL trigger](https://learn.microsoft.com/azure/azure-functions/functions-bindings-azure-sql-trigger) |\\n| Read data from a database | [Input binding](https://learn.microsoft.com/azure/azure-functions/functions-bindings-azure-sql-input) |\\n| Save data to a database | [Output binding](https://learn.microsoft.com/azure/azure-functions/functions-bindings-azure-sql-output) |\\n\",\"contentUrl\":\"https://learn.microsoft.com/azure/azure-functions/functions-bindings-azure-sql#samples\"},{\"title\":\"Azure SQL bindings for Azure Functions overview (programming-language-powershell)\",\"content\":\"# Azure SQL bindings for Azure Functions overview (programming-language-powershell)\\n## Samples\\nIn addition to the samples for C#, Java, JavaScript, PowerShell, and Python available in the [Azure SQL bindings GitHub repository](https://github.com/Azure/azure-functions-sql-extension/tree/main/samples), more are available in Azure Samples:\\n1. [ToDo API sample with Azure SQL bindings (C#)](https://learn.microsoft.com/en-us/samples/azure-samples/azure-sql-binding-func-dotnet-todo/todo-backend-dotnet-azure-sql-bindings-azure-functions/)\\n2. [Use SQL bindings in Azure Stream Analytics](https://learn.microsoft.com/azure/stream-analytics/sql-database-upsert#option-1-update-by-key-with-the-azure-function-sql-binding)\\n# Azure SQL bindings for Azure Functions overview (programming-language-python)\\nThis set of articles explains how to work with [Azure SQL](https://learn.microsoft.com/en-us/azure/azure-sql/index) bindings in Azure Functions. Azure Functions supports input bindings, output bindings, and a function trigger for the Azure SQL and SQL Server products.\\n| Action | Type| \\n| --- | --- |\\n| Trigger a function when a change is detected on a SQL table | [SQL trigger](https://learn.microsoft.com/azure/azure-functions/functions-bindings-azure-sql-trigger) |\\n| Read data from a database | [Input binding](https://learn.microsoft.com/azure/azure-functions/functions-bindings-azure-sql-input) |\\n| Save data to a database | [Output binding](https://learn.microsoft.com/azure/azure-functions/functions-bindings-azure-sql-output) |\\n\",\"contentUrl\":\"https://learn.microsoft.com/azure/azure-functions/functions-bindings-azure-sql#samples\"},{\"title\":\"What is Azure Functions?\",\"content\":\"# What is Azure Functions?\\nAzure Functions is a serverless solution that allows you to build robust apps while using less code, and with less infrastructure and lower costs. Instead of worrying about deploying and maintaining servers, you can use the cloud infrastructure to provide all the up-to-date resources needed to keep your applications running.\\nYou focus on the code that matters most to you, in the most productive language for you, and Azure Functions handles the rest. For a list of supported languages, see [Supported languages in Azure Functions](https://learn.microsoft.com/azure/azure-functions/supported-languages).\\n## Scenarios\\nFunctions provides a comprehensive set of event-driven [triggers and bindings](https://learn.microsoft.com/azure/azure-functions/functions-triggers-bindings) that connect your functions to other services without having to write extra code.\\nThe following list includes common integrated scenarios that use Functions.\\n| If you want to... | then...| \\n| --- | --- |\\n| [Process file uploads](https://learn.microsoft.com/azure/azure-functions/functions-scenarios#process-file-uploads) | Run code when a file is uploaded or changed in blob storage. |\\n| [Process data in real time](https://learn.microsoft.com/azure/azure-functions/functions-scenarios#real-time-stream-and-event-processing) | Capture and transform data from event and IoT source streams on the way to storage. |\\n| [Run AI inference](https://learn.microsoft.com/azure/azure-functions/functions-scenarios#machine-learning-and-ai) | Pull text from a queue and present it to various AI services for analysis and classification. |\\n| [Run scheduled task](https://learn.microsoft.com/azure/azure-functions/functions-scenarios#run-scheduled-tasks) | Execute data clean-up code on predefined timed intervals. |\\n| [Build a scalable web API](https://learn.microsoft.com/azure/azure-functions/functions-scenarios#build-a-scalable-web-api) | Implement a set of REST endpoints for your web applications using HTTP triggers. |\\n| [Build a serverless workflow](https://learn.microsoft.com/azure/azure-functions/functions-scenarios#build-a-serverless-workflow) | Create an event-driven workflow from a series of functions using Durable Functions. |\\n| [Respond to database changes](https://learn.microsoft.com/azure/azure-functions/functions-scenarios#respond-to-database-changes) | Run custom logic when a document is created or updated in a database. |\\n| [Create reliable message systems](https://learn.microsoft.com/azure/azure-functions/functions-scenarios#create-reliable-message-systems) | Process message queues using Azure Queue Storage, Service Bus, or Event Hubs. |\\n\\nThese scenarios allow you to build event-driven systems using modern architectural patterns. For more information, see [Azure Functions scenarios](https://learn.microsoft.com/azure/azure-functions/functions-scenarios).\",\"contentUrl\":\"https://learn.microsoft.com/azure/azure-functions/functions-overview\"},{\"title\":\"Azure Functions libraries for .NET\",\"content\":\"# Azure Functions libraries for .NET\\n## Overview\\n[Azure Functions](https://learn.microsoft.com/en-us/azure/azure-functions/functions-overview) is a solution for easily running small pieces of code, or *functions*, in Azure. Azure Functions supports a [serverless](https://azure.microsoft.com/solutions/serverless/) execution model.\\n## Durable Functions extension\\n*Durable Functions* is an extension of [Azure Functions](https://learn.microsoft.com/en-us/azure/azure-functions/functions-overview) that lets you write stateful functions in a serverless compute environment. The extension lets you define stateful workflows by writing [*orchestrator functions*](https://learn.microsoft.com/en-us/azure/azure-functions/durable/durable-functions-orchestrations) and stateful entities by writing [*entity functions*](https://learn.microsoft.com/en-us/azure/azure-functions/durable/durable-functions-entities) using the Azure Functions programming model. Behind the scenes, the extension manages state, checkpoints, and restarts for you, allowing you to focus on your business logic.\\nInstall the extension [NuGet package](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.DurableTask) directly from the Visual Studio [Package Manager console](https://learn.microsoft.com/en-us/nuget/tools/package-manager-console) or with the [.NET Core CLI](https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-add-package).\\nThe Azure API reference documentation supports [version 2.x of the Durable Functions extension](https://learn.microsoft.com/en-us/dotnet/api/overview/azure/functions/runtime).\\n### Visual Studio package manager\\n\\u0060\\u0060\\u0060powershell\\nInstall-Package Microsoft.Azure.WebJobs.Extensions.DurableTask\\n\\u0060\\u0060\\u0060\\n### .NET Core CLI\\n\\u0060\\u0060\\u0060dotnetcli\\ndotnet add package Microsoft.Azure.WebJobs.Extensions.DurableTask\\n\\u0060\\u0060\\u0060\\n### Getting started\\n## Samples\\nView the [complete list](https://learn.microsoft.com/en-us/samples/browse/?products=azure-functions\\u0026languages=csharp) of Azure Functions samples.\",\"contentUrl\":\"https://learn.microsoft.com/dotnet/api/overview/azure/functions?view=azure-dotnet#overview\"},{\"title\":\"Overview of Azure functions for Azure Redis (programming-language-powershell)\",\"content\":\"# Overview of Azure functions for Azure Redis (programming-language-powershell)\\nThis article describes how to use either Azure Managed Redis or Azure Cache for Redis with Azure Functions to create optimized serverless and event-driven architectures.\\nAzure Functions provides an event-driven programming model where triggers and bindings are key features. With Azure Functions, you can easily build event-driven serverless applications. Azure Redis services (Azure Managed Redis and Azure Cache for Redis) provide a set of building blocks and best practices for building distributed applications, including microservices, state management, pub/sub messaging, and more.\\nAzure Redis can be used as a trigger for Azure Functions, allowing you to initiate a serverless workflow. This functionality can be highly useful in data architectures like a write-behind cache, or any event-based architectures.\\nYou can integrate Azure Redis and Azure Functions to build functions that react to events from Azure Redis or external systems.\\n| Action | Direction| \\n| --- | --- |\\n| [Trigger on Redis pub sub messages](https://learn.microsoft.com/azure/azure-functions/functions-bindings-cache-trigger-redispubsub) | Trigger |\\n| [Trigger on Redis lists](https://learn.microsoft.com/azure/azure-functions/functions-bindings-cache-trigger-redislist) | Trigger |\\n| [Trigger on Redis streams](https://learn.microsoft.com/azure/azure-functions/functions-bindings-cache-trigger-redisstream) | Trigger |\\n| [Read a cached value](https://learn.microsoft.com/azure/azure-functions/functions-bindings-cache-input) | Input |\\n| [Write a values to cache](https://learn.microsoft.com/azure/azure-functions/functions-bindings-cache-output) | Output |\\n\\n## Scope of availability for functions triggers and bindings\\n| Tier | Azure Cache for Redis (Basic, Standard, Premium, Enterprise, Enterprise Flash) | Azure Managed Redis (Memory Optimized, Basic, Compute Optimized, Flash Optimized)| \\n| --- | --- | --- |\\n| Pub/Sub | Yes | Yes |\\n| Lists | Yes | Yes |\\n| Streams | Yes | Yes |\\n| Bindings | Yes | Yes |\\n\\nImportant\\nRedis triggers are currently only supported for functions running in either a [Elastic Premium plan](https://learn.microsoft.com/azure/azure-functions/functions-premium-plan) or a dedicated [App Service plan](https://learn.microsoft.com/azure/azure-functions/dedicated-plan).\",\"contentUrl\":\"https://learn.microsoft.com/azure/azure-functions/functions-bindings-cache\"},{\"title\":\"Overview of Azure functions for Azure Redis (programming-language-java)\",\"content\":\"# Overview of Azure functions for Azure Redis (programming-language-java)\\nThis article describes how to use either Azure Managed Redis or Azure Cache for Redis with Azure Functions to create optimized serverless and event-driven architectures.\\nAzure Functions provides an event-driven programming model where triggers and bindings are key features. With Azure Functions, you can easily build event-driven serverless applications. Azure Redis services (Azure Managed Redis and Azure Cache for Redis) provide a set of building blocks and best practices for building distributed applications, including microservices, state management, pub/sub messaging, and more.\\nAzure Redis can be used as a trigger for Azure Functions, allowing you to initiate a serverless workflow. This functionality can be highly useful in data architectures like a write-behind cache, or any event-based architectures.\\nYou can integrate Azure Redis and Azure Functions to build functions that react to events from Azure Redis or external systems.\\n| Action | Direction| \\n| --- | --- |\\n| [Trigger on Redis pub sub messages](https://learn.microsoft.com/azure/azure-functions/functions-bindings-cache-trigger-redispubsub) | Trigger |\\n| [Trigger on Redis lists](https://learn.microsoft.com/azure/azure-functions/functions-bindings-cache-trigger-redislist) | Trigger |\\n| [Trigger on Redis streams](https://learn.microsoft.com/azure/azure-functions/functions-bindings-cache-trigger-redisstream) | Trigger |\\n| [Read a cached value](https://learn.microsoft.com/azure/azure-functions/functions-bindings-cache-input) | Input |\\n| [Write a values to cache](https://learn.microsoft.com/azure/azure-functions/functions-bindings-cache-output) | Output |\\n\\n## Scope of availability for functions triggers and bindings\\n| Tier | Azure Cache for Redis (Basic, Standard, Premium, Enterprise, Enterprise Flash) | Azure Managed Redis (Memory Optimized, Basic, Compute Optimized, Flash Optimized)| \\n| --- | --- | --- |\\n| Pub/Sub | Yes | Yes |\\n| Lists | Yes | Yes |\\n| Streams | Yes | Yes |\\n| Bindings | Yes | Yes |\\n\\nImportant\\nRedis triggers are currently only supported for functions running in either a [Elastic Premium plan](https://learn.microsoft.com/azure/azure-functions/functions-premium-plan) or a dedicated [App Service plan](https://learn.microsoft.com/azure/azure-functions/dedicated-plan).\",\"contentUrl\":\"https://learn.microsoft.com/azure/azure-functions/functions-bindings-cache\"},{\"title\":\"Get started with Azure Functions (programming-language-csharp)\",\"content\":\"# Get started with Azure Functions (programming-language-csharp)\\nAzure Functions lets you implement your system\\u0027s logic as event-driven, readily available blocks of code. These code blocks are called functions. This article helps you find the most useful Azure Functions content quickly. For more general information about Azure Functions, see the [Introduction to Azure Functions](https://learn.microsoft.com/azure/azure-functions/functions-overview).\\nChoose your preferred development language at the top of the article.\\n## Create your first function\\nComplete a quickstart article to create and deploy your first functions in less than five minutes.\\nYou can create your first function by using one of the following tools:\\n1. [Azure Developer CLI (azd)](https://learn.microsoft.com/azure/azure-functions/create-first-function-azure-developer-cli)\\n2. [Command line](https://learn.microsoft.com/azure/azure-functions/how-to-create-function-azure-cli)\\n3. [Visual Studio Code](https://learn.microsoft.com/azure/azure-functions/how-to-create-function-vs-code)\\n4. [Visual Studio](https://learn.microsoft.com/azure/azure-functions/functions-create-your-first-function-visual-studio)\\n## Review end-to-end samples\\nThese sites let you browse existing functions reference projects and samples in your desired language:\\n1. [Awesome azd template library](https://azure.github.io/awesome-azd/?tags=functions\\u0026tags=dotnetCsharp)\\n2. [Azure Functions samples in GitHub](https://github.com/search?q=topic%3Aazure-functions\\u002Borg%3AAzure-Samples\\u002Bfork%3Atrue\\u002Blanguage%3AC%23\\u0026type=repositories\\u0026l=C%23)\\n3. [Azure samples browser](https://learn.microsoft.com/en-us/samples/browse/?expanded=azure\\u0026languages=csharp\\u0026products=azure-functions)\\n## Scenarios\\nHere are some common scenarios to help you get started:\\n1. [Process file uploads](https://learn.microsoft.com/azure/azure-functions/functions-scenarios#process-file-uploads)\\n2. [Real-time stream and event processing](https://learn.microsoft.com/azure/azure-functions/functions-scenarios#real-time-stream-and-event-processing)\\n3. [Machine learning and AI](https://learn.microsoft.com/azure/azure-functions/functions-scenarios#machine-learning-and-ai)\\n4. [Run scheduled tasks](https://learn.microsoft.com/azure/azure-functions/functions-scenarios#run-scheduled-tasks)\\n5. [Build a scalable web API](https://learn.microsoft.com/azure/azure-functions/functions-scenarios#build-a-scalable-web-api)\\n6. [Build a serverless workflow](https://learn.microsoft.com/azure/azure-functions/functions-scenarios#build-a-serverless-workflow)\\n7. [Respond to database changes](https://learn.microsoft.com/azure/azure-functions/functions-scenarios#respond-to-database-changes)\\n8. [Create reliable message systems](https://learn.microsoft.com/azure/azure-functions/functions-scenarios#create-reliable-message-systems)\",\"contentUrl\":\"https://learn.microsoft.com/azure/azure-functions/functions-get-started\"},{\"title\":\"Get started with Azure Functions (programming-language-javascript)\",\"content\":\"# Get started with Azure Functions (programming-language-javascript)\\nAzure Functions lets you implement your system\\u0027s logic as event-driven, readily available blocks of code. These code blocks are called functions. This article helps you find the most useful Azure Functions content quickly. For more general information about Azure Functions, see the [Introduction to Azure Functions](https://learn.microsoft.com/azure/azure-functions/functions-overview).\\nChoose your preferred development language at the top of the article.\\n## Create your first function\\nComplete a quickstart article to create and deploy your first functions in less than five minutes.\\nYou can create your first function by using one of the following tools:\\n1. [Azure Developer CLI (azd)](https://learn.microsoft.com/azure/azure-functions/create-first-function-azure-developer-cli)\\n2. [Command line](https://learn.microsoft.com/azure/azure-functions/how-to-create-function-azure-cli)\\n3. [Visual Studio Code](https://learn.microsoft.com/azure/azure-functions/how-to-create-function-vs-code)\\n## Review end-to-end samples\\nThese sites let you browse existing functions reference projects and samples in your desired language:\\n1. [Awesome azd template library](https://azure.github.io/awesome-azd/?tags=functions\\u0026tags=javascript)\\n2. [Azure Functions samples in GitHub](https://github.com/search?q=topic%3Aazure-functions\\u002Borg%3AAzure-Samples\\u002Bfork%3Atrue\\u002Blanguage%3AJavaScript\\u0026type=repositories)\\n3. [Azure samples browser](https://learn.microsoft.com/en-us/samples/browse/?expanded=azure\\u0026languages=javascript\\u0026products=azure-functions)\\n## Scenarios\\nHere are some common scenarios to help you get started:\\n1. [Process file uploads](https://learn.microsoft.com/azure/azure-functions/functions-scenarios#process-file-uploads)\\n2. [Real-time stream and event processing](https://learn.microsoft.com/azure/azure-functions/functions-scenarios#real-time-stream-and-event-processing)\\n3. [Machine learning and AI](https://learn.microsoft.com/azure/azure-functions/functions-scenarios#machine-learning-and-ai)\\n4. [Run scheduled tasks](https://learn.microsoft.com/azure/azure-functions/functions-scenarios#run-scheduled-tasks)\\n5. [Build a scalable web API](https://learn.microsoft.com/azure/azure-functions/functions-scenarios#build-a-scalable-web-api)\\n6. [Build a serverless workflow](https://learn.microsoft.com/azure/azure-functions/functions-scenarios#build-a-serverless-workflow)\\n7. [Respond to database changes](https://learn.microsoft.com/azure/azure-functions/functions-scenarios#respond-to-database-changes)\\n8. [Create reliable message systems](https://learn.microsoft.com/azure/azure-functions/functions-scenarios#create-reliable-message-systems)\",\"contentUrl\":\"https://learn.microsoft.com/azure/azure-functions/functions-get-started\"}]}", + "text": "{\"results\":[{\"title\":\"Azure SQL bindings for Azure Functions overview (programming-language-csharp)\",\"content\":\"# Azure SQL bindings for Azure Functions overview (programming-language-csharp)\\n## Samples\\nIn addition to the samples for C#, Java, JavaScript, PowerShell, and Python available in the [Azure SQL bindings GitHub repository](https://github.com/Azure/azure-functions-sql-extension/tree/main/samples), more are available in Azure Samples:\\n1. [ToDo API sample with Azure SQL bindings (C#)](https://learn.microsoft.com/en-us/samples/azure-samples/azure-sql-binding-func-dotnet-todo/todo-backend-dotnet-azure-sql-bindings-azure-functions/)\\n2. [Use SQL bindings in Azure Stream Analytics](https://learn.microsoft.com/azure/stream-analytics/sql-database-upsert#option-1-update-by-key-with-the-azure-function-sql-binding)\\n# Azure SQL bindings for Azure Functions overview (programming-language-javascript)\\nThis set of articles explains how to work with [Azure SQL](https://learn.microsoft.com/en-us/azure/azure-sql/index) bindings in Azure Functions. Azure Functions supports input bindings, output bindings, and a function trigger for the Azure SQL and SQL Server products.\\n| Action | Type| \\n| --- | --- |\\n| Trigger a function when a change is detected on a SQL table | [SQL trigger](https://learn.microsoft.com/azure/azure-functions/functions-bindings-azure-sql-trigger) |\\n| Read data from a database | [Input binding](https://learn.microsoft.com/azure/azure-functions/functions-bindings-azure-sql-input) |\\n| Save data to a database | [Output binding](https://learn.microsoft.com/azure/azure-functions/functions-bindings-azure-sql-output) |\\n\",\"contentUrl\":\"https://learn.microsoft.com/azure/azure-functions/functions-bindings-azure-sql#samples\"},{\"title\":\"Azure SQL bindings for Azure Functions overview (programming-language-javascript)\",\"content\":\"# Azure SQL bindings for Azure Functions overview (programming-language-javascript)\\n## Samples\\nIn addition to the samples for C#, Java, JavaScript, PowerShell, and Python available in the [Azure SQL bindings GitHub repository](https://github.com/Azure/azure-functions-sql-extension/tree/main/samples), more are available in Azure Samples:\\n1. [ToDo API sample with Azure SQL bindings (C#)](https://learn.microsoft.com/en-us/samples/azure-samples/azure-sql-binding-func-dotnet-todo/todo-backend-dotnet-azure-sql-bindings-azure-functions/)\\n2. [Use SQL bindings in Azure Stream Analytics](https://learn.microsoft.com/azure/stream-analytics/sql-database-upsert#option-1-update-by-key-with-the-azure-function-sql-binding)\\n# Azure SQL bindings for Azure Functions overview (programming-language-powershell)\\nThis set of articles explains how to work with [Azure SQL](https://learn.microsoft.com/en-us/azure/azure-sql/index) bindings in Azure Functions. Azure Functions supports input bindings, output bindings, and a function trigger for the Azure SQL and SQL Server products.\\n| Action | Type| \\n| --- | --- |\\n| Trigger a function when a change is detected on a SQL table | [SQL trigger](https://learn.microsoft.com/azure/azure-functions/functions-bindings-azure-sql-trigger) |\\n| Read data from a database | [Input binding](https://learn.microsoft.com/azure/azure-functions/functions-bindings-azure-sql-input) |\\n| Save data to a database | [Output binding](https://learn.microsoft.com/azure/azure-functions/functions-bindings-azure-sql-output) |\\n\",\"contentUrl\":\"https://learn.microsoft.com/azure/azure-functions/functions-bindings-azure-sql#samples\"},{\"title\":\"Azure SQL bindings for Azure Functions overview (programming-language-python)\",\"content\":\"# Azure SQL bindings for Azure Functions overview (programming-language-python)\\n## Samples\\nIn addition to the samples for C#, Java, JavaScript, PowerShell, and Python available in the [Azure SQL bindings GitHub repository](https://github.com/Azure/azure-functions-sql-extension/tree/main/samples), more are available in Azure Samples:\\n1. [ToDo API sample with Azure SQL bindings (C#)](https://learn.microsoft.com/en-us/samples/azure-samples/azure-sql-binding-func-dotnet-todo/todo-backend-dotnet-azure-sql-bindings-azure-functions/)\\n2. [Use SQL bindings in Azure Stream Analytics](https://learn.microsoft.com/azure/stream-analytics/sql-database-upsert#option-1-update-by-key-with-the-azure-function-sql-binding)\\n# Azure SQL bindings for Azure Functions overview (programming-language-java)\\nThis set of articles explains how to work with [Azure SQL](https://learn.microsoft.com/en-us/azure/azure-sql/index) bindings in Azure Functions. Azure Functions supports input bindings, output bindings, and a function trigger for the Azure SQL and SQL Server products.\\n| Action | Type| \\n| --- | --- |\\n| Trigger a function when a change is detected on a SQL table | [SQL trigger](https://learn.microsoft.com/azure/azure-functions/functions-bindings-azure-sql-trigger) |\\n| Read data from a database | [Input binding](https://learn.microsoft.com/azure/azure-functions/functions-bindings-azure-sql-input) |\\n| Save data to a database | [Output binding](https://learn.microsoft.com/azure/azure-functions/functions-bindings-azure-sql-output) |\\n\",\"contentUrl\":\"https://learn.microsoft.com/azure/azure-functions/functions-bindings-azure-sql#samples\"},{\"title\":\"Azure SQL bindings for Azure Functions overview (programming-language-powershell)\",\"content\":\"# Azure SQL bindings for Azure Functions overview (programming-language-powershell)\\n## Samples\\nIn addition to the samples for C#, Java, JavaScript, PowerShell, and Python available in the [Azure SQL bindings GitHub repository](https://github.com/Azure/azure-functions-sql-extension/tree/main/samples), more are available in Azure Samples:\\n1. [ToDo API sample with Azure SQL bindings (C#)](https://learn.microsoft.com/en-us/samples/azure-samples/azure-sql-binding-func-dotnet-todo/todo-backend-dotnet-azure-sql-bindings-azure-functions/)\\n2. [Use SQL bindings in Azure Stream Analytics](https://learn.microsoft.com/azure/stream-analytics/sql-database-upsert#option-1-update-by-key-with-the-azure-function-sql-binding)\\n# Azure SQL bindings for Azure Functions overview (programming-language-python)\\nThis set of articles explains how to work with [Azure SQL](https://learn.microsoft.com/en-us/azure/azure-sql/index) bindings in Azure Functions. Azure Functions supports input bindings, output bindings, and a function trigger for the Azure SQL and SQL Server products.\\n| Action | Type| \\n| --- | --- |\\n| Trigger a function when a change is detected on a SQL table | [SQL trigger](https://learn.microsoft.com/azure/azure-functions/functions-bindings-azure-sql-trigger) |\\n| Read data from a database | [Input binding](https://learn.microsoft.com/azure/azure-functions/functions-bindings-azure-sql-input) |\\n| Save data to a database | [Output binding](https://learn.microsoft.com/azure/azure-functions/functions-bindings-azure-sql-output) |\\n\",\"contentUrl\":\"https://learn.microsoft.com/azure/azure-functions/functions-bindings-azure-sql#samples\"},{\"title\":\"What is Azure Functions?\",\"content\":\"# What is Azure Functions?\\nAzure Functions is a serverless solution that allows you to build robust apps while using less code, and with less infrastructure and lower costs. Instead of worrying about deploying and maintaining servers, you can use the cloud infrastructure to provide all the up-to-date resources needed to keep your applications running.\\nYou focus on the code that matters most to you, in the most productive language for you, and Azure Functions handles the rest. For a list of supported languages, see [Supported languages in Azure Functions](https://learn.microsoft.com/azure/azure-functions/supported-languages).\\n## Scenarios\\nFunctions provides a comprehensive set of event-driven [triggers and bindings](https://learn.microsoft.com/azure/azure-functions/functions-triggers-bindings) that connect your functions to other services without having to write extra code.\\nThe following list includes common integrated scenarios that use Functions.\\n| If you want to... | then...| \\n| --- | --- |\\n| [Process file uploads](https://learn.microsoft.com/azure/azure-functions/functions-scenarios#process-file-uploads) | Run code when a file is uploaded or changed in blob storage. |\\n| [Process data in real time](https://learn.microsoft.com/azure/azure-functions/functions-scenarios#real-time-stream-and-event-processing) | Capture and transform data from event and IoT source streams on the way to storage. |\\n| [Run AI inference](https://learn.microsoft.com/azure/azure-functions/functions-scenarios#machine-learning-and-ai) | Pull text from a queue and present it to various AI services for analysis and classification. |\\n| [Run scheduled task](https://learn.microsoft.com/azure/azure-functions/functions-scenarios#run-scheduled-tasks) | Execute data clean-up code on predefined timed intervals. |\\n| [Build a scalable web API](https://learn.microsoft.com/azure/azure-functions/functions-scenarios#build-a-scalable-web-api) | Implement a set of REST endpoints for your web applications using HTTP triggers. |\\n| [Build a serverless workflow](https://learn.microsoft.com/azure/azure-functions/functions-scenarios#build-a-serverless-workflow) | Create an event-driven workflow from a series of functions using Durable Functions. |\\n| [Respond to database changes](https://learn.microsoft.com/azure/azure-functions/functions-scenarios#respond-to-database-changes) | Run custom logic when a document is created or updated in a database. |\\n| [Create reliable message systems](https://learn.microsoft.com/azure/azure-functions/functions-scenarios#create-reliable-message-systems) | Process message queues using Azure Queue Storage, Service Bus, or Event Hubs. |\\n\\nThese scenarios allow you to build event-driven systems using modern architectural patterns. For more information, see [Azure Functions scenarios](https://learn.microsoft.com/azure/azure-functions/functions-scenarios).\",\"contentUrl\":\"https://learn.microsoft.com/azure/azure-functions/functions-overview\"},{\"title\":\"Azure Functions libraries for .NET\",\"content\":\"# Azure Functions libraries for .NET\\n## Overview\\n[Azure Functions](https://learn.microsoft.com/en-us/azure/azure-functions/functions-overview) is a solution for easily running small pieces of code, or *functions*, in Azure. Azure Functions supports a [serverless](https://azure.microsoft.com/solutions/serverless/) execution model.\\n## Durable Functions extension\\n*Durable Functions* is an extension of [Azure Functions](https://learn.microsoft.com/en-us/azure/azure-functions/functions-overview) that lets you write stateful functions in a serverless compute environment. The extension lets you define stateful workflows by writing [*orchestrator functions*](https://learn.microsoft.com/en-us/azure/azure-functions/durable/durable-functions-orchestrations) and stateful entities by writing [*entity functions*](https://learn.microsoft.com/en-us/azure/azure-functions/durable/durable-functions-entities) using the Azure Functions programming model. Behind the scenes, the extension manages state, checkpoints, and restarts for you, allowing you to focus on your business logic.\\nInstall the extension [NuGet package](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.DurableTask) directly from the Visual Studio [Package Manager console](https://learn.microsoft.com/en-us/nuget/tools/package-manager-console) or with the [.NET Core CLI](https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-add-package).\\nThe Azure API reference documentation supports [version 2.x of the Durable Functions extension](https://learn.microsoft.com/en-us/dotnet/api/overview/azure/functions/runtime).\\n### Visual Studio package manager\\n\\u0060\\u0060\\u0060powershell\\nInstall-Package Microsoft.Azure.WebJobs.Extensions.DurableTask\\n\\u0060\\u0060\\u0060\\n### .NET Core CLI\\n\\u0060\\u0060\\u0060dotnetcli\\ndotnet add package Microsoft.Azure.WebJobs.Extensions.DurableTask\\n\\u0060\\u0060\\u0060\\n### Getting started\\n## Samples\\nView the [complete list](https://learn.microsoft.com/en-us/samples/browse/?products=azure-functions\\u0026languages=csharp) of Azure Functions samples.\",\"contentUrl\":\"https://learn.microsoft.com/dotnet/api/overview/azure/functions?view=azure-dotnet#overview\"},{\"title\":\"Overview of Azure functions for Azure Redis (programming-language-javascript)\",\"content\":\"# Overview of Azure functions for Azure Redis (programming-language-javascript)\\nThis article describes how to use either Azure Managed Redis or Azure Cache for Redis with Azure Functions to create optimized serverless and event-driven architectures.\\nAzure Functions provides an event-driven programming model where triggers and bindings are key features. With Azure Functions, you can easily build event-driven serverless applications. Azure Redis services (Azure Managed Redis and Azure Cache for Redis) provide a set of building blocks and best practices for building distributed applications, including microservices, state management, pub/sub messaging, and more.\\nAzure Redis can be used as a trigger for Azure Functions, allowing you to initiate a serverless workflow. This functionality can be highly useful in data architectures like a write-behind cache, or any event-based architectures.\\nYou can integrate Azure Redis and Azure Functions to build functions that react to events from Azure Redis or external systems.\\n| Action | Direction| \\n| --- | --- |\\n| [Trigger on Redis pub sub messages](https://learn.microsoft.com/azure/azure-functions/functions-bindings-cache-trigger-redispubsub) | Trigger |\\n| [Trigger on Redis lists](https://learn.microsoft.com/azure/azure-functions/functions-bindings-cache-trigger-redislist) | Trigger |\\n| [Trigger on Redis streams](https://learn.microsoft.com/azure/azure-functions/functions-bindings-cache-trigger-redisstream) | Trigger |\\n| [Read a cached value](https://learn.microsoft.com/azure/azure-functions/functions-bindings-cache-input) | Input |\\n| [Write a values to cache](https://learn.microsoft.com/azure/azure-functions/functions-bindings-cache-output) | Output |\\n\\n## Scope of availability for functions triggers and bindings\\n| Tier | Azure Cache for Redis (Basic, Standard, Premium, Enterprise, Enterprise Flash) | Azure Managed Redis (Memory Optimized, Basic, Compute Optimized, Flash Optimized)| \\n| --- | --- | --- |\\n| Pub/Sub | Yes | Yes |\\n| Lists | Yes | Yes |\\n| Streams | Yes | Yes |\\n| Bindings | Yes | Yes |\\n\\nImportant\\nRedis triggers are currently only supported for functions running in either a [Elastic Premium plan](https://learn.microsoft.com/azure/azure-functions/functions-premium-plan) or a dedicated [App Service plan](https://learn.microsoft.com/azure/azure-functions/dedicated-plan).\",\"contentUrl\":\"https://learn.microsoft.com/azure/azure-functions/functions-bindings-cache\"},{\"title\":\"Overview of Azure functions for Azure Redis (programming-language-csharp)\",\"content\":\"# Overview of Azure functions for Azure Redis (programming-language-csharp)\\nThis article describes how to use either Azure Managed Redis or Azure Cache for Redis with Azure Functions to create optimized serverless and event-driven architectures.\\nAzure Functions provides an event-driven programming model where triggers and bindings are key features. With Azure Functions, you can easily build event-driven serverless applications. Azure Redis services (Azure Managed Redis and Azure Cache for Redis) provide a set of building blocks and best practices for building distributed applications, including microservices, state management, pub/sub messaging, and more.\\nAzure Redis can be used as a trigger for Azure Functions, allowing you to initiate a serverless workflow. This functionality can be highly useful in data architectures like a write-behind cache, or any event-based architectures.\\nYou can integrate Azure Redis and Azure Functions to build functions that react to events from Azure Redis or external systems.\\n| Action | Direction| \\n| --- | --- |\\n| [Trigger on Redis pub sub messages](https://learn.microsoft.com/azure/azure-functions/functions-bindings-cache-trigger-redispubsub) | Trigger |\\n| [Trigger on Redis lists](https://learn.microsoft.com/azure/azure-functions/functions-bindings-cache-trigger-redislist) | Trigger |\\n| [Trigger on Redis streams](https://learn.microsoft.com/azure/azure-functions/functions-bindings-cache-trigger-redisstream) | Trigger |\\n| [Read a cached value](https://learn.microsoft.com/azure/azure-functions/functions-bindings-cache-input) | Input |\\n| [Write a values to cache](https://learn.microsoft.com/azure/azure-functions/functions-bindings-cache-output) | Output |\\n\\n## Scope of availability for functions triggers and bindings\\n| Tier | Azure Cache for Redis (Basic, Standard, Premium, Enterprise, Enterprise Flash) | Azure Managed Redis (Memory Optimized, Basic, Compute Optimized, Flash Optimized)| \\n| --- | --- | --- |\\n| Pub/Sub | Yes | Yes |\\n| Lists | Yes | Yes |\\n| Streams | Yes | Yes |\\n| Bindings | Yes | Yes |\\n\\nImportant\\nRedis triggers are currently only supported for functions running in either a [Elastic Premium plan](https://learn.microsoft.com/azure/azure-functions/functions-premium-plan) or a dedicated [App Service plan](https://learn.microsoft.com/azure/azure-functions/dedicated-plan).\",\"contentUrl\":\"https://learn.microsoft.com/azure/azure-functions/functions-bindings-cache\"},{\"title\":\"Overview of Azure functions for Azure Redis (programming-language-java)\",\"content\":\"# Overview of Azure functions for Azure Redis (programming-language-java)\\nThis article describes how to use either Azure Managed Redis or Azure Cache for Redis with Azure Functions to create optimized serverless and event-driven architectures.\\nAzure Functions provides an event-driven programming model where triggers and bindings are key features. With Azure Functions, you can easily build event-driven serverless applications. Azure Redis services (Azure Managed Redis and Azure Cache for Redis) provide a set of building blocks and best practices for building distributed applications, including microservices, state management, pub/sub messaging, and more.\\nAzure Redis can be used as a trigger for Azure Functions, allowing you to initiate a serverless workflow. This functionality can be highly useful in data architectures like a write-behind cache, or any event-based architectures.\\nYou can integrate Azure Redis and Azure Functions to build functions that react to events from Azure Redis or external systems.\\n| Action | Direction| \\n| --- | --- |\\n| [Trigger on Redis pub sub messages](https://learn.microsoft.com/azure/azure-functions/functions-bindings-cache-trigger-redispubsub) | Trigger |\\n| [Trigger on Redis lists](https://learn.microsoft.com/azure/azure-functions/functions-bindings-cache-trigger-redislist) | Trigger |\\n| [Trigger on Redis streams](https://learn.microsoft.com/azure/azure-functions/functions-bindings-cache-trigger-redisstream) | Trigger |\\n| [Read a cached value](https://learn.microsoft.com/azure/azure-functions/functions-bindings-cache-input) | Input |\\n| [Write a values to cache](https://learn.microsoft.com/azure/azure-functions/functions-bindings-cache-output) | Output |\\n\\n## Scope of availability for functions triggers and bindings\\n| Tier | Azure Cache for Redis (Basic, Standard, Premium, Enterprise, Enterprise Flash) | Azure Managed Redis (Memory Optimized, Basic, Compute Optimized, Flash Optimized)| \\n| --- | --- | --- |\\n| Pub/Sub | Yes | Yes |\\n| Lists | Yes | Yes |\\n| Streams | Yes | Yes |\\n| Bindings | Yes | Yes |\\n\\nImportant\\nRedis triggers are currently only supported for functions running in either a [Elastic Premium plan](https://learn.microsoft.com/azure/azure-functions/functions-premium-plan) or a dedicated [App Service plan](https://learn.microsoft.com/azure/azure-functions/dedicated-plan).\",\"contentUrl\":\"https://learn.microsoft.com/azure/azure-functions/functions-bindings-cache\"},{\"title\":\"Get started with Azure Functions (programming-language-csharp)\",\"content\":\"# Get started with Azure Functions (programming-language-csharp)\\nAzure Functions lets you implement your system\\u0027s logic as event-driven, readily available blocks of code. These code blocks are called functions. This article helps you find the most useful Azure Functions content quickly. For more general information about Azure Functions, see the [Introduction to Azure Functions](https://learn.microsoft.com/azure/azure-functions/functions-overview).\\nChoose your preferred development language at the top of the article.\\n## Create your first function\\nComplete a quickstart article to create and deploy your first functions in less than five minutes.\\nYou can create your first function by using one of the following tools:\\n1. [Azure Developer CLI (azd)](https://learn.microsoft.com/azure/azure-functions/create-first-function-azure-developer-cli)\\n2. [Command line](https://learn.microsoft.com/azure/azure-functions/how-to-create-function-azure-cli)\\n3. [Visual Studio Code](https://learn.microsoft.com/azure/azure-functions/how-to-create-function-vs-code)\\n4. [Visual Studio](https://learn.microsoft.com/azure/azure-functions/functions-create-your-first-function-visual-studio)\\n## Review end-to-end samples\\nThese sites let you browse existing functions reference projects and samples in your desired language:\\n1. [Awesome azd template library](https://azure.github.io/awesome-azd/?tags=functions\\u0026tags=dotnetCsharp)\\n2. [Azure Functions samples in GitHub](https://github.com/search?q=topic%3Aazure-functions\\u002Borg%3AAzure-Samples\\u002Bfork%3Atrue\\u002Blanguage%3AC%23\\u0026type=repositories\\u0026l=C%23)\\n3. [Azure samples browser](https://learn.microsoft.com/en-us/samples/browse/?expanded=azure\\u0026languages=csharp\\u0026products=azure-functions)\\n## Scenarios\\nHere are some common scenarios to help you get started:\\n1. [Process file uploads](https://learn.microsoft.com/azure/azure-functions/functions-scenarios#process-file-uploads)\\n2. [Real-time stream and event processing](https://learn.microsoft.com/azure/azure-functions/functions-scenarios#real-time-stream-and-event-processing)\\n3. [Machine learning and AI](https://learn.microsoft.com/azure/azure-functions/functions-scenarios#machine-learning-and-ai)\\n4. [Run scheduled tasks](https://learn.microsoft.com/azure/azure-functions/functions-scenarios#run-scheduled-tasks)\\n5. [Build a scalable web API](https://learn.microsoft.com/azure/azure-functions/functions-scenarios#build-a-scalable-web-api)\\n6. [Build a serverless workflow](https://learn.microsoft.com/azure/azure-functions/functions-scenarios#build-a-serverless-workflow)\\n7. [Respond to database changes](https://learn.microsoft.com/azure/azure-functions/functions-scenarios#respond-to-database-changes)\\n8. [Create reliable message systems](https://learn.microsoft.com/azure/azure-functions/functions-scenarios#create-reliable-message-systems)\",\"contentUrl\":\"https://learn.microsoft.com/azure/azure-functions/functions-get-started\"}]}", "annotations": null, "_meta": null } @@ -58,8 +58,13 @@ "contentUrl": "https://learn.microsoft.com/dotnet/api/overview/azure/functions?view=azure-dotnet#overview" }, { - "title": "Overview of Azure functions for Azure Redis (programming-language-powershell)", - "content": "# Overview of Azure functions for Azure Redis (programming-language-powershell)\nThis article describes how to use either Azure Managed Redis or Azure Cache for Redis with Azure Functions to create optimized serverless and event-driven architectures.\nAzure Functions provides an event-driven programming model where triggers and bindings are key features. With Azure Functions, you can easily build event-driven serverless applications. Azure Redis services (Azure Managed Redis and Azure Cache for Redis) provide a set of building blocks and best practices for building distributed applications, including microservices, state management, pub/sub messaging, and more.\nAzure Redis can be used as a trigger for Azure Functions, allowing you to initiate a serverless workflow. This functionality can be highly useful in data architectures like a write-behind cache, or any event-based architectures.\nYou can integrate Azure Redis and Azure Functions to build functions that react to events from Azure Redis or external systems.\n| Action | Direction| \n| --- | --- |\n| [Trigger on Redis pub sub messages](https://learn.microsoft.com/azure/azure-functions/functions-bindings-cache-trigger-redispubsub) | Trigger |\n| [Trigger on Redis lists](https://learn.microsoft.com/azure/azure-functions/functions-bindings-cache-trigger-redislist) | Trigger |\n| [Trigger on Redis streams](https://learn.microsoft.com/azure/azure-functions/functions-bindings-cache-trigger-redisstream) | Trigger |\n| [Read a cached value](https://learn.microsoft.com/azure/azure-functions/functions-bindings-cache-input) | Input |\n| [Write a values to cache](https://learn.microsoft.com/azure/azure-functions/functions-bindings-cache-output) | Output |\n\n## Scope of availability for functions triggers and bindings\n| Tier | Azure Cache for Redis (Basic, Standard, Premium, Enterprise, Enterprise Flash) | Azure Managed Redis (Memory Optimized, Basic, Compute Optimized, Flash Optimized)| \n| --- | --- | --- |\n| Pub/Sub | Yes | Yes |\n| Lists | Yes | Yes |\n| Streams | Yes | Yes |\n| Bindings | Yes | Yes |\n\nImportant\nRedis triggers are currently only supported for functions running in either a [Elastic Premium plan](https://learn.microsoft.com/azure/azure-functions/functions-premium-plan) or a dedicated [App Service plan](https://learn.microsoft.com/azure/azure-functions/dedicated-plan).", + "title": "Overview of Azure functions for Azure Redis (programming-language-javascript)", + "content": "# Overview of Azure functions for Azure Redis (programming-language-javascript)\nThis article describes how to use either Azure Managed Redis or Azure Cache for Redis with Azure Functions to create optimized serverless and event-driven architectures.\nAzure Functions provides an event-driven programming model where triggers and bindings are key features. With Azure Functions, you can easily build event-driven serverless applications. Azure Redis services (Azure Managed Redis and Azure Cache for Redis) provide a set of building blocks and best practices for building distributed applications, including microservices, state management, pub/sub messaging, and more.\nAzure Redis can be used as a trigger for Azure Functions, allowing you to initiate a serverless workflow. This functionality can be highly useful in data architectures like a write-behind cache, or any event-based architectures.\nYou can integrate Azure Redis and Azure Functions to build functions that react to events from Azure Redis or external systems.\n| Action | Direction| \n| --- | --- |\n| [Trigger on Redis pub sub messages](https://learn.microsoft.com/azure/azure-functions/functions-bindings-cache-trigger-redispubsub) | Trigger |\n| [Trigger on Redis lists](https://learn.microsoft.com/azure/azure-functions/functions-bindings-cache-trigger-redislist) | Trigger |\n| [Trigger on Redis streams](https://learn.microsoft.com/azure/azure-functions/functions-bindings-cache-trigger-redisstream) | Trigger |\n| [Read a cached value](https://learn.microsoft.com/azure/azure-functions/functions-bindings-cache-input) | Input |\n| [Write a values to cache](https://learn.microsoft.com/azure/azure-functions/functions-bindings-cache-output) | Output |\n\n## Scope of availability for functions triggers and bindings\n| Tier | Azure Cache for Redis (Basic, Standard, Premium, Enterprise, Enterprise Flash) | Azure Managed Redis (Memory Optimized, Basic, Compute Optimized, Flash Optimized)| \n| --- | --- | --- |\n| Pub/Sub | Yes | Yes |\n| Lists | Yes | Yes |\n| Streams | Yes | Yes |\n| Bindings | Yes | Yes |\n\nImportant\nRedis triggers are currently only supported for functions running in either a [Elastic Premium plan](https://learn.microsoft.com/azure/azure-functions/functions-premium-plan) or a dedicated [App Service plan](https://learn.microsoft.com/azure/azure-functions/dedicated-plan).", + "contentUrl": "https://learn.microsoft.com/azure/azure-functions/functions-bindings-cache" + }, + { + "title": "Overview of Azure functions for Azure Redis (programming-language-csharp)", + "content": "# Overview of Azure functions for Azure Redis (programming-language-csharp)\nThis article describes how to use either Azure Managed Redis or Azure Cache for Redis with Azure Functions to create optimized serverless and event-driven architectures.\nAzure Functions provides an event-driven programming model where triggers and bindings are key features. With Azure Functions, you can easily build event-driven serverless applications. Azure Redis services (Azure Managed Redis and Azure Cache for Redis) provide a set of building blocks and best practices for building distributed applications, including microservices, state management, pub/sub messaging, and more.\nAzure Redis can be used as a trigger for Azure Functions, allowing you to initiate a serverless workflow. This functionality can be highly useful in data architectures like a write-behind cache, or any event-based architectures.\nYou can integrate Azure Redis and Azure Functions to build functions that react to events from Azure Redis or external systems.\n| Action | Direction| \n| --- | --- |\n| [Trigger on Redis pub sub messages](https://learn.microsoft.com/azure/azure-functions/functions-bindings-cache-trigger-redispubsub) | Trigger |\n| [Trigger on Redis lists](https://learn.microsoft.com/azure/azure-functions/functions-bindings-cache-trigger-redislist) | Trigger |\n| [Trigger on Redis streams](https://learn.microsoft.com/azure/azure-functions/functions-bindings-cache-trigger-redisstream) | Trigger |\n| [Read a cached value](https://learn.microsoft.com/azure/azure-functions/functions-bindings-cache-input) | Input |\n| [Write a values to cache](https://learn.microsoft.com/azure/azure-functions/functions-bindings-cache-output) | Output |\n\n## Scope of availability for functions triggers and bindings\n| Tier | Azure Cache for Redis (Basic, Standard, Premium, Enterprise, Enterprise Flash) | Azure Managed Redis (Memory Optimized, Basic, Compute Optimized, Flash Optimized)| \n| --- | --- | --- |\n| Pub/Sub | Yes | Yes |\n| Lists | Yes | Yes |\n| Streams | Yes | Yes |\n| Bindings | Yes | Yes |\n\nImportant\nRedis triggers are currently only supported for functions running in either a [Elastic Premium plan](https://learn.microsoft.com/azure/azure-functions/functions-premium-plan) or a dedicated [App Service plan](https://learn.microsoft.com/azure/azure-functions/dedicated-plan).", "contentUrl": "https://learn.microsoft.com/azure/azure-functions/functions-bindings-cache" }, { @@ -71,11 +76,6 @@ "title": "Get started with Azure Functions (programming-language-csharp)", "content": "# Get started with Azure Functions (programming-language-csharp)\nAzure Functions lets you implement your system's logic as event-driven, readily available blocks of code. These code blocks are called functions. This article helps you find the most useful Azure Functions content quickly. For more general information about Azure Functions, see the [Introduction to Azure Functions](https://learn.microsoft.com/azure/azure-functions/functions-overview).\nChoose your preferred development language at the top of the article.\n## Create your first function\nComplete a quickstart article to create and deploy your first functions in less than five minutes.\nYou can create your first function by using one of the following tools:\n1. [Azure Developer CLI (azd)](https://learn.microsoft.com/azure/azure-functions/create-first-function-azure-developer-cli)\n2. [Command line](https://learn.microsoft.com/azure/azure-functions/how-to-create-function-azure-cli)\n3. [Visual Studio Code](https://learn.microsoft.com/azure/azure-functions/how-to-create-function-vs-code)\n4. [Visual Studio](https://learn.microsoft.com/azure/azure-functions/functions-create-your-first-function-visual-studio)\n## Review end-to-end samples\nThese sites let you browse existing functions reference projects and samples in your desired language:\n1. [Awesome azd template library](https://azure.github.io/awesome-azd/?tags=functions&tags=dotnetCsharp)\n2. [Azure Functions samples in GitHub](https://github.com/search?q=topic%3Aazure-functions+org%3AAzure-Samples+fork%3Atrue+language%3AC%23&type=repositories&l=C%23)\n3. [Azure samples browser](https://learn.microsoft.com/en-us/samples/browse/?expanded=azure&languages=csharp&products=azure-functions)\n## Scenarios\nHere are some common scenarios to help you get started:\n1. [Process file uploads](https://learn.microsoft.com/azure/azure-functions/functions-scenarios#process-file-uploads)\n2. [Real-time stream and event processing](https://learn.microsoft.com/azure/azure-functions/functions-scenarios#real-time-stream-and-event-processing)\n3. [Machine learning and AI](https://learn.microsoft.com/azure/azure-functions/functions-scenarios#machine-learning-and-ai)\n4. [Run scheduled tasks](https://learn.microsoft.com/azure/azure-functions/functions-scenarios#run-scheduled-tasks)\n5. [Build a scalable web API](https://learn.microsoft.com/azure/azure-functions/functions-scenarios#build-a-scalable-web-api)\n6. [Build a serverless workflow](https://learn.microsoft.com/azure/azure-functions/functions-scenarios#build-a-serverless-workflow)\n7. [Respond to database changes](https://learn.microsoft.com/azure/azure-functions/functions-scenarios#respond-to-database-changes)\n8. [Create reliable message systems](https://learn.microsoft.com/azure/azure-functions/functions-scenarios#create-reliable-message-systems)", "contentUrl": "https://learn.microsoft.com/azure/azure-functions/functions-get-started" - }, - { - "title": "Get started with Azure Functions (programming-language-javascript)", - "content": "# Get started with Azure Functions (programming-language-javascript)\nAzure Functions lets you implement your system's logic as event-driven, readily available blocks of code. These code blocks are called functions. This article helps you find the most useful Azure Functions content quickly. For more general information about Azure Functions, see the [Introduction to Azure Functions](https://learn.microsoft.com/azure/azure-functions/functions-overview).\nChoose your preferred development language at the top of the article.\n## Create your first function\nComplete a quickstart article to create and deploy your first functions in less than five minutes.\nYou can create your first function by using one of the following tools:\n1. [Azure Developer CLI (azd)](https://learn.microsoft.com/azure/azure-functions/create-first-function-azure-developer-cli)\n2. [Command line](https://learn.microsoft.com/azure/azure-functions/how-to-create-function-azure-cli)\n3. [Visual Studio Code](https://learn.microsoft.com/azure/azure-functions/how-to-create-function-vs-code)\n## Review end-to-end samples\nThese sites let you browse existing functions reference projects and samples in your desired language:\n1. [Awesome azd template library](https://azure.github.io/awesome-azd/?tags=functions&tags=javascript)\n2. [Azure Functions samples in GitHub](https://github.com/search?q=topic%3Aazure-functions+org%3AAzure-Samples+fork%3Atrue+language%3AJavaScript&type=repositories)\n3. [Azure samples browser](https://learn.microsoft.com/en-us/samples/browse/?expanded=azure&languages=javascript&products=azure-functions)\n## Scenarios\nHere are some common scenarios to help you get started:\n1. [Process file uploads](https://learn.microsoft.com/azure/azure-functions/functions-scenarios#process-file-uploads)\n2. [Real-time stream and event processing](https://learn.microsoft.com/azure/azure-functions/functions-scenarios#real-time-stream-and-event-processing)\n3. [Machine learning and AI](https://learn.microsoft.com/azure/azure-functions/functions-scenarios#machine-learning-and-ai)\n4. [Run scheduled tasks](https://learn.microsoft.com/azure/azure-functions/functions-scenarios#run-scheduled-tasks)\n5. [Build a scalable web API](https://learn.microsoft.com/azure/azure-functions/functions-scenarios#build-a-scalable-web-api)\n6. [Build a serverless workflow](https://learn.microsoft.com/azure/azure-functions/functions-scenarios#build-a-serverless-workflow)\n7. [Respond to database changes](https://learn.microsoft.com/azure/azure-functions/functions-scenarios#respond-to-database-changes)\n8. [Create reliable message systems](https://learn.microsoft.com/azure/azure-functions/functions-scenarios#create-reliable-message-systems)", - "contentUrl": "https://learn.microsoft.com/azure/azure-functions/functions-get-started" } ] }, diff --git a/regression-tests.log b/regression-tests.log index f1d5d330ba0..ec4562d427d 100644 --- a/regression-tests.log +++ b/regression-tests.log @@ -1,18 +1,22 @@ + +> litellm-dashboard@0.1.0 test +> vitest --run src/app/(dashboard)/mcp-servers/_components/editToolPreview.test.ts src/app/(dashboard)/mcp-servers/_components/mcp_server_edit.integration.test.tsx src/app/(dashboard)/mcp-servers/_components/mcp_tool_configuration.test.tsx src/app/(dashboard)/mcp-servers/_components/mcp_server_edit.test.tsx + Testing types with tsc and vue-tsc is an experimental feature. Breaking changes might not follow SemVer, please pin Vitest's version when using it. RUN v4.1.11 /Users/jvalluru/LiteLLM-work/litellm-lit-7135/ui/litellm-dashboard Importing from "vitest/environments" is deprecated since Vitest 4.1. Please use "vitest/runtime" instead. -The Vitest environment jsdom-fetch defines the "transformMode". This options was deprecated in Vitest 4 and will be removed in the next major version. Please, use "viteEnvironment" instead. Importing from "vitest/environments" is deprecated since Vitest 4.1. Please use "vitest/runtime" instead. The Vitest environment jsdom-fetch defines the "transformMode". This options was deprecated in Vitest 4 and will be removed in the next major version. Please, use "viteEnvironment" instead. Importing from "vitest/environments" is deprecated since Vitest 4.1. Please use "vitest/runtime" instead. +The Vitest environment jsdom-fetch defines the "transformMode". This options was deprecated in Vitest 4 and will be removed in the next major version. Please, use "viteEnvironment" instead. The Vitest environment jsdom-fetch defines the "transformMode". This options was deprecated in Vitest 4 and will be removed in the next major version. Please, use "viteEnvironment" instead. Test Files 4 passed (4) - Tests 125 passed (125) + Tests 129 passed (129) Type Errors no errors - Start at 17:37:15 - Duration 12.90s (transform 4.59s, setup 648ms, import 7.53s, tests 16.01s, environment 2.47s) + Start at 18:04:27 + Duration 6.70s (transform 844ms, setup 341ms, import 1.85s, tests 10.53s, environment 1.15s) diff --git a/ui-build.log b/ui-build.log index d22a028598c..bae48e7c08a 100644 --- a/ui-build.log +++ b/ui-build.log @@ -9,15 +9,15 @@ ⨯ useTypeScriptCli Creating an optimized production build ... -✓ Compiled successfully in 6.8s +✓ Compiled successfully in 2.4s Running TypeScript ... - Finished TypeScript in 27.4s ... + Finished TypeScript in 27.1s ... Collecting page data using 17 workers ... Generating static pages using 17 workers (0/51) ... Generating static pages using 17 workers (12/51) Generating static pages using 17 workers (25/51) Generating static pages using 17 workers (38/51) -✓ Generating static pages using 17 workers (51/51) in 596ms +✓ Generating static pages using 17 workers (51/51) in 435ms Turbopack build encountered 1 warning: ./public/assets/logos/enkrypt_ai.avif Warning: AVIF image not supported diff --git a/verify-origin.py b/verify-origin.py new file mode 100644 index 00000000000..20ee218cf4f --- /dev/null +++ b/verify-origin.py @@ -0,0 +1,42 @@ +import asyncio,json +from pathlib import Path +from playwright.async_api import async_playwright,expect +from seed import request,root +from urllib.error import HTTPError + +async def check_ui(): + async with async_playwright() as pw: + browser=await pw.chromium.connect_over_cdp('http://127.0.0.1:9713') + page=browser.contexts[0].pages[0] + await page.goto('http://localhost:47135/ui/mcp-servers/') + await page.get_by_title('preview_url',exact=True).click() + await page.get_by_role('tab',name='Settings',exact=True).click() + await expect(page.get_by_text('Unable to load tools',exact=True)).to_be_visible(timeout=30000) + calls=[] + def record(req): + if '/mcp-rest/test/tools/list' in req.url: calls.append(req.method) + page.on('request',record) + await page.get_by_label('MCP Server URL',exact=True).fill('http://litellm-7135-upstream-1:8080/mcp') + message=page.get_by_text('The server origin changed. Enter credentials and replace or remove saved static headers to preview tools.',exact=True) + await expect(message).to_be_visible() + await page.wait_for_timeout(1000) + assert calls==[] + await page.get_by_label('Authentication Value',exact=True).fill('preview:correct') + await expect(page.get_by_role('button',name='Flat List',exact=True)).to_be_visible(timeout=15000) + await page.get_by_role('button',name='Flat List',exact=True).click() + await expect(page.get_by_text('echo',exact=True)).to_be_visible() + page.remove_listener('request',record) + await browser.close() + return {'guardVisible':True,'requestsBeforeCredential':0,'requestsAfterCredential':len(calls),'toolVisible':'echo'} + +sid=json.loads((root/'servers.json').read_text())['url'] +payload={'server_id':sid,'url':'http://litellm-7135-upstream-1:8080/mcp','transport':'http','auth_type':'basic'} +try: + status,result=request('POST','/mcp-rest/test/tools/list',payload) +except HTTPError as error: + status,result=error.code,json.load(error) +assert status != 200 or result.get('error') or not result.get('tools') +explicit_status,explicit=request('POST','/mcp-rest/test/tools/list',{**payload,'credentials':{'auth_value':'preview:correct'}}) +assert explicit_status==200 and explicit['tools'][0]['name']=='echo' +evidence={'commit':(root/'after-sha').read_text().strip(),'withoutExplicitCredential':{'status':status,'toolCount':len(result.get('tools',[]))},'withExplicitCredential':{'status':explicit_status,'tools':[t['name'] for t in explicit['tools']]},'ui':asyncio.run(check_ui())} +(root/'origin-boundary.json').write_text(json.dumps(evidence,indent=2));print(json.dumps(evidence))