Merged
Conversation
d95070c to
3dabf07
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR streamlines “tools” across the stack by switching to the OpenAI Responses API function-tool shape end-to-end, simplifying /api/tools to return a raw list, improving the chat tool selector UX, and adding frontend manifest includes resolution for easier module composition.
Changes:
- Flattened tool definitions (frontend + backend) to use
{ type: "function", name, description, parameters, strict }and updated tool fetching/usage accordingly. - Added frontend manifest
includesresolution with merge/replace/drop collision strategies and accompanying tests/docs. - Introduced a backend
ToolsRouterModulethat aggregates multiple tool registries and dispatches tool execution by tool name.
Reviewed changes
Copilot reviewed 42 out of 43 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
| frontend/omni/src/modules/tools-service/toolName.ts | Adds helper to sort tools by name. |
| frontend/omni/src/modules/tools-service/toolName.test.ts | Unit test for tool name sorting. |
| frontend/omni/src/modules/tools-service/modaiBackendToolsService.svelte.ts | Updates tools fetch parsing to expect a raw tool list from /api/tools. |
| frontend/omni/src/modules/tools-service/index.svelte.ts | Flattens OpenAIFunctionTool type to Responses API shape. |
| frontend/omni/src/modules/tools-service/index.svelte.test.ts | Updates tools-service tests to match raw list response + flattened tool shape. |
| frontend/omni/src/modules/fetch-service/sessionFetchService.svelte.ts | Makes session fetch service delegate to injected fetch service (instead of global fetch). |
| frontend/omni/src/modules/fetch-service/fetchService.test.ts | Updates tests for injected fetch dependency and adds delegation coverage. |
| frontend/omni/src/modules/chat/ChatToolsSelector.svelte | Sorts tools, formats display names, adds tooltip descriptions, and makes popover scrollable. |
| frontend/omni/src/modules/chat/ChatComponent.svelte | Updates selection logic to use tool.name instead of nested tool.function.name. |
| frontend/omni/src/modules/chat-service/openai.svelte.ts | Updates OpenAI tool conversion to use flattened tool fields. |
| frontend/omni/src/modules/chat-service/openai.svelte.test.ts | Updates OpenAI chat-service tests for flattened tool schema. |
| frontend/omni/src/core/module-system/ModulesProvider.svelte | Switches manifest loading to resolveManifest (supports includes). |
| frontend/omni/src/core/module-system/manifestJson.ts | Implements manifest include resolution + collision strategies + deep merge. |
| frontend/omni/src/core/module-system/manifestJson.test.ts | Adds comprehensive tests for include resolution and collision strategies. |
| frontend/omni/public/modules_with_backend.json | Adds dependency wiring for session fetch service to wrap a base fetch service. |
| frontend/omni/justfile | Renames check-write to format. |
| frontend/omni/docs/architecture/core.md | Documents manifest includes and collision behavior. |
| frontend/omni/CHANGELOG.md | Notes manifest includes and tools API/UX changes. |
| frontend/omni/.gitignore | Updates ignored module manifest outputs under public/. |
| e2e_tests/tests_omni_light/justfile | Renames check-write to format. |
| e2e_tests/tests_omni_full/src/chat.spec.ts | Updates tool enabling to match human-readable tool display name. |
| e2e_tests/tests_omni_full/justfile | Renames check-write to format. |
| e2e_tests/tests_omni_full/backend-config-e2e.yaml | Updates tools config to use tool_servers and OpenAPI spec URL. |
| backend/tools/dice-roller/justfile | Renames check-write to format. |
| backend/omni/src/modai/modules/tools/tools_web_module.py | Removes the old web module that wrapped tool definitions in an envelope. |
| backend/omni/src/modai/modules/tools/tool_router.py | Adds router module to aggregate registries and expose GET /api/tools. |
| backend/omni/src/modai/modules/tools/tool_registry_predefined_vars.py | Refactors predefined-vars registry to be request-aware and operate on OpenAI tool dicts. |
| backend/omni/src/modai/modules/tools/tool_registry_openapi.py | Refactors OpenAPI tool registry to expose all operations and execute by operationId. |
| backend/omni/src/modai/modules/tools/README.md | Adds backend tools module documentation and configuration examples. |
| backend/omni/src/modai/modules/tools/module.py | Refactors tool contract to get_tools(request) / run_tool(request, params) and uses FunctionToolParam. |
| backend/omni/src/modai/modules/tools/tests/test_tools_web_module.py | Removes tests for deleted tools web module. |
| backend/omni/src/modai/modules/tools/tests/test_tool_router.py | Adds tests for tools router aggregation and dispatch behavior. |
| backend/omni/src/modai/modules/tools/tests/test_tool_registry_predefined_vars.py | Updates tests for new request-aware predefined-vars registry behavior. |
| backend/omni/src/modai/modules/tools/tests/test_tool_registry_openapi.py | Updates tests for operation-based discovery/execution and new config format. |
| backend/omni/src/modai/modules/chat/openai_agent_chat.py | Updates tool execution path to call tool_registry.run_tool(request, params). |
| backend/omni/src/modai/modules/chat/tests/test_chat_llm_modules.py | Updates tool-call tests for the new registry execution contract. |
| backend/omni/src/modai/default_config.yaml | Updates default tool registry wiring (router + predefined vars + openapi). |
| backend/omni/justfile | Renames check-write to format. |
| backend/omni/docs/architecture/tools.md | Updates tools architecture docs to the new router/registry contract and raw list response. |
| backend/omni/config.sample.yaml | Removes outdated tools config and adds a clarifying auth comment. |
| backend/omni/CHANGELOG.md | Notes tool registry refactor, raw tool list response, and config changes. |
| backend/omni/.gitignore | Adds backend-local ignores for configs, dbs, and .env. |
| .gitignore | Removes global *.db ignore (leaving .env). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.