Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8985231

Browse files
committed
Fix Typos
1 parent 4ad30f7 commit 8985231

File tree

4 files changed

+21
-21
lines changed

4 files changed

+21
-21
lines changed

registry/coder/modules/aider/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ module "aider" {
1616
version = "1.0.0"
1717
agent_id = coder_agent.example.id
1818
credentials = var.api_key
19-
provider = "google"
19+
ai_provider = "google"
2020
model = "gemini"
2121
}
2222
```
@@ -40,7 +40,7 @@ module "aider" {
4040
agent_id = coder_agent.example.id
4141
credentials = var.gemini_api_key
4242
install_aider = true
43-
provider = "google"
43+
ai_provider = "google"
4444
model = "gemini"
4545
install_agentapi = true
4646
system_prompt = "..."
@@ -61,7 +61,7 @@ module "aider" {
6161
source = "registry.coder.com/coder/aider/coder"
6262
version = "1.0.0"
6363
agent_id = coder_agent.example.id
64-
provider = "custom"
64+
ai_provider = "custom"
6565
custom_env_var_name = "MY_CUSTOM_API_KEY"
6666
model = "custom-model"
6767
credentials = var.custom_api_key

registry/coder/modules/aider/main.test.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ describe("Aider", async () => {
7676
test("happy-path", async () => {
7777
const { id } = await setup({
7878
moduleVariables: {
79-
ai_model: "gemini",
79+
model: "gemini",
8080
},
8181
});
8282
await execModuleScript(id);
@@ -87,8 +87,8 @@ describe("Aider", async () => {
8787
const apiKey = "test-api-key-123";
8888
const { id } = await setup({
8989
moduleVariables: {
90-
ai_api_key: apiKey,
91-
ai_model: "gemini",
90+
credentials: apiKey,
91+
model: "gemini",
9292
},
9393
});
9494
await execModuleScript(id);
@@ -104,7 +104,7 @@ describe("Aider", async () => {
104104
const { id } = await setup({
105105
moduleVariables: {
106106
folder,
107-
ai_model: "gemini",
107+
model: "gemini",
108108
},
109109
});
110110
await execModuleScript(id);
@@ -121,7 +121,7 @@ describe("Aider", async () => {
121121
experiment_pre_install_script: "#!/bin/bash\necho 'pre-install-script'",
122122
experiment_post_install_script:
123123
"#!/bin/bash\necho 'post-install-script'",
124-
ai_model: "gemini",
124+
model: "gemini",
125125
},
126126
});
127127
await execModuleScript(id);
@@ -142,7 +142,7 @@ describe("Aider", async () => {
142142
const { id } = await setup({
143143
moduleVariables: {
144144
system_prompt,
145-
ai_model: "gemini",
145+
model: "gemini",
146146
},
147147
});
148148
await execModuleScript(id);
@@ -158,8 +158,8 @@ describe("Aider", async () => {
158158
const apiKey = "test-api-key-123";
159159
const { id } = await setup({
160160
moduleVariables: {
161-
ai_api_key: apiKey,
162-
ai_model: "gemini",
161+
credentials: apiKey,
162+
model: "gemini",
163163
},
164164
});
165165
await execModuleScript(id, {

registry/coder/modules/aider/main.tf

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -100,12 +100,12 @@ variable "experiment_additional_extensions" {
100100
default = null
101101
}
102102

103-
variable "provider" {
103+
variable "ai_provider" {
104104
type = string
105105
description = "AI provider to use with Aider (openai, anthropic, azure, google, etc.)"
106106
default = "google"
107107
validation {
108-
condition = contains(["openai", "anthropic", "azure", "google", "cohere", "mistral", "ollama", "custom"], var.provider)
108+
condition = contains(["openai", "anthropic", "azure", "google", "cohere", "mistral", "ollama", "custom"], var.ai_provider)
109109
error_message = "provider must be one of: openai, anthropic, azure, google, cohere, mistral, ollama, custom"
110110
}
111111
}
@@ -234,10 +234,10 @@ locals {
234234
}
235235

236236
# Get the environment variable name for selected provider
237-
env_var_name = local.provider_env_vars[var.provider]
237+
env_var_name = local.provider_env_vars[var.ai_provider]
238238

239239
# Model flag for aider command
240-
model_flag = var.provider == "ollama" ? "--ollama-model" : "--model"
240+
model_flag = var.ai_provider == "ollama" ? "--ollama-model" : "--model"
241241

242242
install_script = file("${path.module}/scripts/install.sh")
243243
start_script = file("${path.module}/scripts/start.sh")
@@ -271,7 +271,7 @@ module "agentapi" {
271271
AIDER_START_DIRECTORY='${var.folder}' \
272272
ARG_API_KEY='${var.credentials}' \
273273
ARG_MODEL='${var.model}' \
274-
ARG_PROVIDER='${var.provider}' \
274+
ARG_PROVIDER='${var.ai_provider}' \
275275
ARG_ENV_API_NAME_HOLDER='${local.env_var_name}' \
276276
AIDER_PROMPT='${var.aider_prompt}' \
277277
/tmp/start.sh

registry/coder/modules/aider/scripts/start.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ set -euo pipefail
55
export PATH="$HOME/.local/bin:$PATH"
66

77
echo "--------------------------------"
8-
echo "Provider: $ARG_AI_PROVIDER"
9-
echo "Module: $ARG_AI_MODULE"
8+
echo "Provider: $ARG_PROVIDER"
9+
echo "Module: $ARG_MODEL"
1010
echo "--------------------------------"
1111

1212
if [ -n "$ARG_API_KEY" ]; then
@@ -19,14 +19,14 @@ fi
1919
if [[ "${AIDER_PROMPT}" == "true" && -n "${ARG_TASK_PROMPT:-}" ]]; then
2020
printf "Aider start only with this prompt : $ARG_TASK_PROMPT"
2121
mkdir -p $HOME/.aider-module/
22-
echo aider --model $ARG_AI_MODULE --yes-always --message "$ARG_TASK_PROMPT" > $HOME/.aider-module/aider_output.txt
22+
echo aider --model $ARG_MODEL --yes-always --message "$ARG_TASK_PROMPT" > $HOME/.aider-module/aider_output.txt
2323

2424
elif [ -n "${ARG_TASK_PROMPT:-}" ]; then
2525
printf "Aider task prompt provided : $ARG_TASK_PROMPT"
2626
PROMPT="Every step of the way, report tasks to Coder with proper descriptions and statuses. Your task at hand: $ARG_TASK_PROMPT"
2727

28-
agentapi server --term-width=67 --term-height=1190 -- aider --model $ARG_AI_MODULE --yes-always --message "$ARG_TASK_PROMPT"
28+
agentapi server --term-width=67 --term-height=1190 -- aider --model $ARG_MODEL --yes-always --message "$ARG_TASK_PROMPT"
2929
else
3030
printf "No task prompt given.\n"
31-
agentapi server --term-width=67 --term-height=1190 -- aider --model $ARG_AI_MODULE --yes-always
31+
agentapi server --term-width=67 --term-height=1190 -- aider --model $ARG_MODEL --yes-always
3232
fi

0 commit comments

Comments
 (0)