Skip to content

llm: e2e tests for thv llm setup/teardown against real tool installations #5074

Closed

Description

@yrobla

Summary

We have unit tests that verify ConfigureLLMGateway/RevertLLMGateway produce correct JSON output against the real supportedClientIntegrations entries (added in #5065). What we don't have is end-to-end coverage that runs thv llm setup on a machine where the actual tool is installed and verifies the tool picks up the configuration.

What's missing

  • Run thv llm setup on a CI runner with Claude Code, Gemini CLI, or Cursor installed
  • Verify the settings file was patched at the expected path with the expected keys
  • Start the tool and confirm it routes through the LLM gateway (or at minimum reads the patched config)
  • Run thv llm teardown and verify the settings file is cleanly reverted

Why it matters

The unit tests catch config-table typos and JSON patch logic errors. E2E catches:

  • The tool actually reads from the path we patch (not a different settings file)
  • Token helper command is invoked correctly by the tool
  • Proxy mode tools correctly route through thv llm proxy
  • Platform-specific path resolution is correct on real CI OS images

Suggested approach

Add a Chainsaw-style or shell-based E2E test in test/e2e/ that:

  1. Installs a lightweight tool (e.g. Gemini CLI or Claude Code) in the CI environment
  2. Runs thv llm config set + thv llm setup
  3. Asserts the settings file content
  4. Runs thv llm teardown and asserts cleanup

Context

Tracked from PR #5065 review discussion.

Activity

  1. added
    enhancement
    on Apr 27, 2026
  2. added
    go
    cli
    llm gateway
    on Apr 27, 2026
  3. yrobla commented on Apr 29, 2026

    @yrobla
    ContributorAuthor

    PR #5108 was closed without merging. Closing this issue as the e2e test effort is being deferred.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    clienhancementgollm gatewaytesting

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions