Skip to content

Commit 5dab7a5

Browse files
refactor(gemini): remove hardcoded port configuration and simplify agentapi server startup
Remove AGENTAPI_PORT parameter handling and PORT variable assignment in start script, allowing agentapi server to use its default port. Update test name from "happy-path" to "agent-api" for better clarity of what is being tested.
1 parent 00647fd commit 5dab7a5

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

registry/coder-labs/modules/gemini/main.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ describe("gemini", async () => {
7070
await runTerraformInit(import.meta.dir);
7171
});
7272

73-
test("happy-path", async () => {
73+
test("agent-api", async () => {
7474
const { id } = await setup();
7575
await execModuleScript(id);
7676
await expectAgentAPIStarted(id);

registry/coder-labs/modules/gemini/scripts/start.sh

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@
22
set -o errexit
33
set -o pipefail
44

5-
6-
AGENTAPI_PORT="$2"
7-
85
source "$HOME"/.bashrc
96

107
command_exists() {
@@ -73,6 +70,5 @@ else
7370
printf "No API key provided (neither GEMINI_API_KEY nor GOOGLE_API_KEY)\n"
7471
fi
7572

76-
PORT=${AGENTAPI_PORT:-3284}
77-
agentapi server --port "$PORT" --term-width 67 --term-height 1190 -- \
73+
agentapi server --term-width 67 --term-height 1190 -- \
7874
bash -c "$(printf '%q ' gemini "${GEMINI_ARGS[@]}")"

0 commit comments

Comments
 (0)