Commit Graph

  • 9baeade022 Bump version to 0.0.9 main Hemang 2025-11-06 12:42:09 +01:00
  • 89fb100be6 Merge pull request #71 from invariantlabs-ai/feat/use-cli-client-name Hemang Sarkar 2025-11-06 17:09:53 +05:30
  • 1b08b8fb66 fix: removing gemini from litellm for now, it is breaking Hemang 2025-11-06 12:19:46 +01:00
  • a6bed68aa5 Update gemini model name for litellm Hemang 2025-11-06 11:45:00 +01:00
  • 44ffbb0ee6 fix: broken anthropic tests Hemang 2025-11-06 11:32:33 +01:00
  • a5fe02bdf2 Change gemini-2.0-flash to gemini-2.5-flash Hemang 2025-11-06 11:06:31 +01:00
  • 6e7106ea26 fix: update anthropic model Luca Beurer-Kellner 2025-11-06 09:39:30 +01:00
  • 5ad89808a1 try: remove anthropic tests Luca Beurer-Kellner 2025-11-06 09:31:25 +01:00
  • a120e2c7c4 feat: use cli client and srver name Luca Beurer-Kellner 2025-11-05 18:07:06 +01:00
  • f6cb73cabe Bundler Compatibility (#70) Kristian Nielsen 2025-07-17 10:34:09 +02:00
  • a7a79b31c2 remove timestamp bundler-testing knielsen404 2025-07-16 16:59:44 +02:00
  • e279b351ed remove superfluous changes knielsen404 2025-07-16 14:26:30 +02:00
  • 094fd6e94e add session id knielsen404 2025-07-15 11:17:16 +02:00
  • b8fbb37935 add dataset field to check request knielsen404 2025-07-15 11:00:36 +02:00
  • 31b128950b add changes knielsen404 2025-07-11 17:49:00 +02:00
  • 39cde09249 Fix broken Gemini tests. Hemang 2025-07-09 16:54:17 +02:00
  • 8af2f4463d Update pyproject.toml Hemang Sarkar 2025-07-09 16:19:01 +02:00
  • e0980d2661 add timestamps (#66) Kristian Nielsen 2025-06-26 19:38:20 +02:00
  • df33199343 Use tenacity.RetryError instead of genai.errors.ClientError for gemini guardrailing errors. Hemang 2025-06-19 12:54:29 +02:00
  • 70091b7f53 Version bump. Hemang 2025-06-19 11:16:01 +02:00
  • 491a279f6e Update comments and function names. Hemang 2025-06-11 22:17:03 +02:00
  • b6b738a9aa Remove print statements. Hemang 2025-06-11 16:16:34 +02:00
  • d59a96676f Format diff. Hemang 2025-06-11 16:15:52 +02:00
  • 1825f543a7 Remove unnecessary methods. Hemang 2025-06-11 15:57:38 +02:00
  • 9f564a0401 Refactor the LLM provider routes to move common functionalities into a BaseInstrumentedResponse class and move provier specific implementations in the corresponding BaseProvider implementations. Hemang 2025-06-11 15:20:10 +02:00
  • 3a4b102485 Merge remote-tracking branch 'origin/main' into feature-message-timestamps feature-message-timestamps knielsen404 2025-06-05 14:51:57 +02:00
  • 6d3498a94f add timestamps knielsen404 2025-06-05 14:47:44 +02:00
  • 42a9c1cc30 Readability changes. Hemang 2025-06-05 11:17:35 +02:00
  • cd6d6a50b0 Small changes related to constants and sorting order of imports. Hemang 2025-06-05 09:55:02 +02:00
  • 24d47c4585 Update gemini route to include streamGenerateContent in allowed endpoints response. Hemang 2025-06-04 15:04:56 +02:00
  • f184c488e8 Bump to version 0.0.6 Hemang 2025-06-04 14:23:22 +02:00
  • da03dbe7c5 Move is_stateless_http_server metadata assignment to the Streamable route from the common metadata method. Hemang 2025-06-04 14:15:08 +02:00
  • 9053d89f25 Small cleanups in MCP related code. Hemang 2025-06-04 13:59:41 +02:00
  • f3b5e2d0b1 Update README.md Hemang Sarkar 2025-06-04 13:31:47 +02:00
  • 05e09331e9 Address comments on PR and update README. Hemang 2025-06-04 11:20:52 +02:00
  • cc3e96c20a Clean up MCP tests and clients. Hemang 2025-06-04 10:07:22 +02:00
  • f6ba31ab2e Move util methods to MCPTransportBase. Hemang 2025-06-03 17:53:45 +02:00
  • 7ec13ad852 Create StreamableTransport class for MCP Streamable http transport. This subclasses MCPTransportBase. Hemang 2025-06-03 15:43:25 +02:00
  • 2e6f669923 Create SSETransport class for MCP SSE transport. This subclasses MCPTransportBase. Hemang 2025-06-03 14:26:30 +02:00
  • 7efd15e2a9 Move MCP related routes to the MCP directory and introduce the MCPTransportBase class. Hemang 2025-06-03 13:59:34 +02:00
  • e8106776b4 Refactor stdio implementation to use McpSession class. Hemang 2025-06-03 11:55:36 +02:00
  • 6849fc7daa Update McpSession class so that it can be used from both sse/streamable and stdio transports. Also update SseHeaderAttributes to McpAttributes so that it be can be used different MCP transports. Hemang 2025-06-02 11:59:14 +02:00
  • 96826fa06d Cleanup some code in test_mcp.py Hemang 2025-05-27 23:01:59 +02:00
  • bfb57029e6 Small cleanups. Hemang 2025-05-27 22:43:06 +02:00
  • ab3fb98b67 Add blocking and logging related tests for MCP streamable HTTP route. Hemang 2025-05-27 22:36:44 +02:00
  • 115ae5f36b Add tests for MCP streamable HTTP route for json/sse and stateless/stateful servers. Hemang 2025-05-27 17:00:13 +02:00
  • 34979ed18d Move hook_tool_call and hook_tool_call_response to mcp_utils.py so that it can be used by both SSE and Streamable implementations. Hemang 2025-05-27 14:53:19 +02:00
  • 6e61a76168 Add blocking and logging of guardrails for MCP Streamable http route. Hemang 2025-05-27 14:03:48 +02:00
  • 20adc7804b Accep the invariant api key in the header for sse gateway and use it for guardrailing and pushing to explorer. Hemang 2025-05-26 10:42:59 +02:00
  • 71e2ac9a06 Add implementation for MCP streamable GET, POST and DELETE endpoints without push to explorer or guardrailing. Hemang 2025-05-22 15:02:56 +02:00
  • f8bf7be405 Add mcp_streamable route and refactor some common code between sse and streamable. Update tests for 400 errors in sse. Hemang 2025-05-22 11:47:52 +02:00
  • 6f70927c0b add timestamps to messages add-message-timestamps knielsen404 2025-05-22 17:30:43 +02:00
  • 5b68e80be5 Add MCP client and server name when calling fetch_guardrails_from_explorer in SSE. Hemang 2025-05-22 09:36:18 +02:00
  • 03817b005c Update metadata in MCP SSE similar to what we do in MCP stdio. Hemang 2025-05-21 16:15:14 +02:00
  • 177d247a83 Update pyproject.toml Luca Beurer-Kellner 2025-05-21 16:46:43 +02:00
  • 04d0b70c48 use metadata client to fetch policies Luca Beurer-Kellner 2025-05-21 16:28:06 +02:00
  • 169eb066b9 Small cleanups in sse and stdio MCP implementation. Hemang 2025-05-21 14:05:51 +02:00
  • 418c873e04 Update pyproject.toml Luca Beurer-Kellner 2025-05-21 10:05:48 +02:00
  • c1112b91fc use windows select (#56) Luca Beurer-Kellner 2025-05-21 09:43:00 +02:00
  • dc75b1aee8 fix matrix syntax windows-ci Luca Beurer-Kellner 2025-05-21 09:28:07 +02:00
  • d7ff816834 try to run tests on windows Luca Beurer-Kellner 2025-05-21 09:25:41 +02:00
  • 99b5497b81 factor out platform-specific stdin waiting windows-select Luca Beurer-Kellner 2025-05-20 22:45:56 +02:00
  • 1b6e01b8f5 use windows select Luca Beurer-Kellner 2025-05-20 20:36:28 +02:00
  • 2060f18b0a Update pyproject.toml Luca Beurer-Kellner 2025-05-19 14:22:56 +02:00
  • e18c6b5bdb Add an option to add extra metadata that is pushed and passed to Guardrails during an MCP session (#47) Luca Beurer-Kellner 2025-05-19 13:44:37 +02:00
  • 922f4a533d flaky test: handle second possible result in anthropic streaming case mcp-metadata Luca Beurer-Kellner 2025-05-19 13:34:35 +02:00
  • 80944f2caf Add traceback to debug 500 gemini error in test_generate_content_with_image. gemini-test-error Hemang 2025-05-19 12:01:52 +02:00
  • 40fc832e88 don't list_tools in stdio connect Luca Beurer-Kellner 2025-05-16 22:19:22 +02:00
  • 1b48aa22d3 tools/list test Luca Beurer-Kellner 2025-05-16 22:00:22 +02:00
  • 28d7c0ef6c use error-based failure response format by default Luca Beurer-Kellner 2025-05-16 21:40:43 +02:00
  • 6363c6eb97 support for blocking tools/list in SSE Luca Beurer-Kellner 2025-05-16 21:33:16 +02:00
  • c16a12fdec adjust guardrail failure address Luca Beurer-Kellner 2025-05-16 20:02:43 +02:00
  • e6da45bf74 use python -m build Luca Beurer-Kellner 2025-05-16 19:53:15 +02:00
  • ac68e4a8f7 port tools/list message support to SSE Luca Beurer-Kellner 2025-05-16 19:49:30 +02:00
  • f05731b55f append trace even if not pushing Luca Beurer-Kellner 2025-05-16 14:05:23 +02:00
  • d57e3f8740 Merge branch 'main' into mcp-metadata Luca Beurer-Kellner 2025-05-16 13:54:55 +02:00
  • 983844a0a9 Merge branch 'main' into mcp-metadata Luca Beurer-Kellner 2025-05-16 11:32:48 +02:00
  • 4dbb400620 Move invariant api key check to __main__.py so that the same check can work for both mcp and server commands. Hemang 2025-05-16 09:59:43 +02:00
  • f33b2392f6 Fix the Dockerfle for gateway to copy correctly. Hemang 2025-05-15 18:15:31 +02:00
  • 780e5f6ee7 Skip test_generate_content_with_image for gemini. Getting 500. Hemang 2025-05-15 18:02:09 +02:00
  • 876eb44c78 Make MCP stdio gateway fully async. With sync and async mixed behaviour for running background tasks we were running into issues. Hemang 2025-05-15 16:01:57 +02:00
  • a6c1124076 Update test_mcp.py Hemang Sarkar 2025-05-15 11:07:29 +02:00
  • 0ffde69391 Fix test_mcp_sse_with_gateway_hybrid_guardrails so that we don't rely on order of annotations. Hemang Sarkar 2025-05-15 10:54:12 +02:00
  • a214837b1e Add message to session store for MCP sse in post path before returning. Hemang 2025-05-14 15:44:52 +02:00
  • fefc22eea0 Update test_mcp.py to include the transport parameter in the hybrid guardrails test. Hemang Sarkar 2025-05-14 15:32:05 +02:00
  • e32ec74ed2 Fix paths to pyproject.toml and README in dockerfile.gateway. Also update context in publish-images.yml Hemang 2025-05-14 12:26:15 +02:00
  • ed50670bef Add MCP gateway tests with hybrid guardrails (both blocking and logging). Also refactor tests so that we can parameterize the transport type - stdio or sse. Hemang 2025-05-14 12:07:38 +02:00
  • 8eae198eb0 Add integration tests for MCP SSE via gateway with guardrails. Hemang 2025-05-14 10:31:03 +02:00
  • e2e004b7b1 Move dockerfiles inside gateway/ and update main CLI script to be able to run build, up, down and logs on a local gateway server instance. Hemang 2025-05-13 09:41:09 +02:00
  • 73de68e822 Update tests_ci.yml with a timeout at the job level. Hemang Sarkar 2025-05-12 15:36:33 +02:00
  • 7cd5950e38 Merge branch 'main' into mcp-metadata knielsen404 2025-05-12 11:09:22 +02:00
  • 8f9c28158d add server and client name to policy get knielsen404 2025-05-09 18:43:08 +02:00
  • dbab86e0ac Fix broken tests. Hemang 2025-05-09 12:06:02 +05:30
  • 645d73fc66 Add example MCP Client and Server fpr SSE based transport. mcp-sse-example-client-server Hemang 2025-05-09 11:34:06 +05:30
  • edd9fd9a5c When tool_call is blocked in MCP Post method, add the error message to a pending error messages list. Create two queues in the MCP SSE Get endpoint which correspond to the MCP server events and these pending error messages. These two queues are merged to return events back to the client. Hemang 2025-05-09 10:47:08 +05:30
  • 8988f9a7dd verbose logging + loud exception failure Luca Beurer-Kellner 2025-05-08 18:33:44 +02:00
  • cfacbde975 log version Luca Beurer-Kellner 2025-05-08 18:08:19 +02:00
  • c2e9745163 line logging Luca Beurer-Kellner 2025-05-08 18:03:37 +02:00
  • 794aae0326 Add MCP guardrailing for SSE. Hemang 2025-05-08 20:39:37 +05:30
  • 9fc384d629 mcp: make error reporting configurable Luca Beurer-Kellner 2025-05-08 15:24:59 +02:00