diff --git a/cli/main.py b/cli/main.py index 4802f11..69808e8 100644 --- a/cli/main.py +++ b/cli/main.py @@ -40,6 +40,7 @@ async def call_research_tool( params = StdioServerParameters( command=sys.executable, args=["-m", "researchers.web.server"], + env=os.environ.copy(), ) async with stdio_client(params) as (read, write): async with ClientSession(read, write) as session: diff --git a/scripts/docker-test.sh b/scripts/docker-test.sh index e7cc707..d844061 100755 --- a/scripts/docker-test.sh +++ b/scripts/docker-test.sh @@ -31,7 +31,13 @@ case "$cmd" in exit 1 fi mkdir -p "$HOME/.marchwarden/traces" - docker run --rm -it \ + tty_flag="" + if [ -t 0 ] && [ -t 1 ]; then tty_flag="-it"; fi + env_flag="" + if [ -n "${MARCHWARDEN_MODEL:-}" ]; then + env_flag="-e MARCHWARDEN_MODEL=$MARCHWARDEN_MODEL" + fi + docker run --rm $tty_flag $env_flag \ -v "$ROOT:/app" \ -v "$HOME/secrets:/root/secrets:ro" \ -v "$HOME/.marchwarden:/root/.marchwarden" \