Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions packages/sdk/tests/fixtures/agent-environment-variables.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
version: "1"

providers:
qoder:
api_key: test-token

defaults:
provider: qoder

agents:
assistant:
model: auto
instructions: Test environment variable parsing.
environment_variables:
FEATURE_FLAG: "on"
RETRY_COUNT: "3"
9 changes: 9 additions & 0 deletions packages/sdk/tests/unit/parser.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,3 +79,12 @@ test("rejects environment setup scripts over 64 KiB by UTF-8 byte length", () =>
expect(result.success).toBe(false);
if (!result.success) expect(result.error.issues[0]?.message).toContain("65536 UTF-8 bytes");
});

test("preserves Agent environment variables from YAML", async () => {
const { config, errors } = await loadConfig(resolve(FIXTURES, "agent-environment-variables.yaml"));
expect(errors).toEqual([]);
expect(config.agents?.assistant?.environment_variables).toEqual({
FEATURE_FLAG: "on",
RETRY_COUNT: "3",
});
});