Skip to content

Conversation

Weves
Copy link
Contributor

@Weves Weves commented Sep 22, 2025

Description

[Provide a brief description of the changes in this PR]

How Has This Been Tested?

[Describe the tests you ran to verify your changes]

Backporting (check the box to trigger backport action)

Note: You have to check that the action passes, otherwise resolve the conflicts manually and tag the patches.

  • This PR should be backported (make sure to check that the backport attempt succeeds)
  • [Optional] Override Linear Check

Summary by cubic

Adds a Code Interpreter tool that runs Python in an isolated service, stages input files, and returns stdout/stderr plus generated artifacts back into the chat. Includes server config, DB seeding, UI toggles, and tests.

  • New Features

    • New AnalysisTool (run_code_interpreter) calling POST /execute with code, stdin, timeout, and staged files.
    • Persists generated files to the file store, infers mime types, and surfaces them in chat; text files are added to the next prompt.
    • Tool becomes a built-in; constructed only when CODE_INTERPRETER_BASE_URL is set.
    • Env config: CODE_INTERPRETER_BASE_URL, CODE_INTERPRETER_DEFAULT_TIMEOUT_MS (default 30000), CODE_INTERPRETER_REQUEST_TIMEOUT_SECONDS (default 30).
    • Admin UI: toggle “Code Interpreter”; tool shown with a terminal icon; setup hint when not configured.
    • Unit tests cover artifact persistence, lazy file loading, and service error handling.
  • Migration

    • Run DB migrations to seed the tool entry.
    • Set CODE_INTERPRETER_BASE_URL (required), optionally adjust timeouts.
    • Restart the server, then enable “Code Interpreter” in the Assistant settings.

Copy link

vercel bot commented Sep 22, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
internal-search Ready Ready Preview Comment Sep 22, 2025 4:07am

Copy link
Contributor Author

Weves commented Sep 22, 2025

6 Jobs Failed:

Run Integration Tests v2 / integration-tests (tests/migrations, tests-migrations) failed on "Run Integration Tests for tests-migrations"
[...]
            )
            tools = result.fetchall()
    
            # Should have all 5 builtin tools
>           assert (
                len(tools) == 5
            ), f"Should have created exactly 5 builtin tools, got {len(tools)}"
E           AssertionError: Should have created exactly 5 builtin tools, got 6
E           assert 6 == 5
E            +  where 6 = len([(1, 'SearchTool', 'Internal Search', 'The Search Action allows the Assistant to search through connected knowledge to... write artifacts, stream stdout and stderr, and return generated outputs for the chat session.', 'AnalysisTool', None)])

tests/integration/tests/migrations/test_tool_seeding.py:48: AssertionError
=========================== short test summary info ============================
FAILED tests/integration/tests/migrations/test_tool_seeding.py::test_tool_seeding_migration
=================== 1 failed, 2 passed, 5 skipped in 12.10s ====================
CRITICAL: Exiting due to uncaught exception AssertionError: Should have created exactly 5 builtin tools, got 6
assert 6 == 5
 +  where 6 = len([(1, 'SearchTool', 'Internal Search', 'The Search Action allows the Assistant to search through connected knowledge to... write artifacts, stream stdout and stderr, and return generated outputs for the chat session.', 'AnalysisTool', None)])
Error: Final attempt failed. Child_process exited with error code 1
Run Integration Tests v2 / required failed on "Run actions/github-script@v7"
[...]
  retry-exempt-status-codes: 400,401,403,404,422
env:
  PRIVATE_REGISTRY: experimental-registry.blacksmith.sh:5000
  PRIVATE_REGISTRY_USERNAME: ***
  PRIVATE_REGISTRY_PASSWORD: ***
  OPENAI_API_KEY: ***
  SLACK_BOT_TOKEN: ***
  CONFLUENCE_TEST_SPACE_URL: ***
  CONFLUENCE_USER_NAME: ***
  CONFLUENCE_ACCESS_TOKEN: ***
  JIRA_BASE_URL: ***
  JIRA_USER_EMAIL: ***
  JIRA_API_TOKEN: ***
  PERM_SYNC_SHAREPOINT_CLIENT_ID: ***
  PERM_SYNC_SHAREPOINT_PRIVATE_KEY: ***
  PERM_SYNC_SHAREPOINT_CERTIFICATE_PASSWORD: ***
  PERM_SYNC_SHAREPOINT_DIRECTORY_ID: ***
  GITHUB_REPO_NAME: ***/onyx
Error: One or more upstream jobs failed or were cancelled.

4 jobs failed running on non-Blacksmith runners.


Summary: 4 successful workflows, 5 failed workflows

Last updated: 2025-09-22 04:25:48 UTC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant