From ab999e9e9ca525139a002e9e43ef91a1ef2be047 Mon Sep 17 00:00:00 2001 From: Mannie Date: Fri, 24 Jul 2026 07:34:43 +0100 Subject: [PATCH 1/4] docs: update CONTRIBUTING.md with quickstart guide and guidelines --- CONTRIBUTING.md | 82 +++++++++++++------ .../SchemaControls/connectionUtils.ts | 26 ++++-- .../tests/unit/connectionUtils.test.ts | 40 +++++++++ 3 files changed, 120 insertions(+), 28 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d4096c11f8..99bd36b4f3 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -3,38 +3,74 @@ title: "Contributing to Agenta" description: "Guidelines for contributing to the Agenta project" --- -Thanks for your interest in contributing to Agenta. +Thanks for your interest in contributing to Agenta! The contributor docs are the main source of truth for how to get started, run the project locally, test your changes, and open a pull request. -Start here: +## Quick Links -- [Contributor overview](https://agenta.ai/docs/contributing/overview) -- [Creating your first PR](https://agenta.ai/docs/contributing/first-pr) -- [Development mode](https://agenta.ai/docs/contributing/guides/development-mode) -- [Testing](https://agenta.ai/docs/contributing/guides/testing) +- [Contributor overview](https://agenta.ai/docs/contributing/overview) +- [Creating your first PR](https://agenta.ai/docs/contributing/first-pr) +- [Development mode](https://agenta.ai/docs/contributing/guides/development-mode) +- [Testing](https://agenta.ai/docs/contributing/guides/testing) - [Formatting and linting](https://agenta.ai/docs/contributing/guides/formatting-and-linting) - [Slack community](https://join.slack.com/t/agenta-hq/shared_invite/zt-37pnbp5s6-mbBrPL863d_oLB61GSNFjw) +## Quickstart & Local Development + +1. **Clone the Repository**: + ```bash + git clone https://github.com/agenta-ai/agenta.git + cd agenta + ``` + +2. **Install Dependencies**: + ```bash + pnpm install + ``` + +3. **Start Development Server**: + ```bash + pnpm dev + ``` + +4. **Lint & Test**: + ```bash + pnpm lint + pnpm test + ``` + +## Branching & Commit Conventions + +- **Branch Naming**: Use clear prefixes for branch names: + - `feat/feature-name` for new features + - `fix/issue-description` for bug fixes + - `docs/topic-name` for documentation updates +- **Commit Messages**: Follow [Conventional Commits](https://www.conventionalcommits.org/) standards (e.g., `feat: add user evaluation workflow`, `fix: resolve API timeout issue`). + ## Pull Requests Before you request review, make sure your pull request: -- explains what changed and why -- includes a short demo for UI changes -- lists what you tested locally -- notes what still needs QA -- passes the relevant formatting, linting, and test checks locally - -## Contribution Rules - -We had many inactive issues and pull requests in the past. To keep work moving: - -- An issue may only be assigned to one person for up to one week (three days for very simple issues). If the issue remains unsolved after a week, it will be unassigned and made available to others. -- Any pull request left inactive by the author for over a week may be closed. The author can reopen it later and continue the work. - -## Contributor License Agreement - -If you want to contribute, you need to sign the Contributor License Agreement. This helps us avoid intellectual property problems in the future. - +- Explains what changed and why. +- Includes a short demo (video or screenshot) for UI changes. +- Lists what you tested locally. +- Notes what still needs QA. +- Passes all formatting, linting, and test checks locally (`pnpm lint`, `pnpm test`). + +## Contribution Rules + +We had many inactive issues and pull requests in the past. To keep work moving: + +- **Issue Assignments**: An issue may only be assigned to one person for up to **one week** (three days for very simple issues). If the issue remains unsolved after a week, it will be unassigned and made available to others. +- **Pull Request Activity**: Any pull request left inactive by the author for over **one week** may be closed. The author can reopen it later and continue the work. + +## Contributor License Agreement (CLA) + +If you want to contribute, you need to sign the Contributor License Agreement. This helps us avoid intellectual property problems in the future. + After you open a pull request, a bot will comment with a link. Sign the agreement there with your GitHub account. + +## Security Vulnerabilities + +If you discover a security vulnerability within Agenta, please do **not** open a public issue. Instead, report it privately via GitHub Security Advisories or contact the maintainers directly on Slack. diff --git a/web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/connectionUtils.ts b/web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/connectionUtils.ts index 2630fd5ba8..71be5cf490 100644 --- a/web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/connectionUtils.ts +++ b/web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/connectionUtils.ts @@ -349,13 +349,16 @@ export function providerForModel( /** * Whether a model id is reachable under the harness (present in any of its published model - * groups). A harness with no published models is permissive (returns true) so the schema-catalog - * fallback path is not over-cleared. Use to clear an unreachable model on harness switch. + * groups or a reachable custom_provider vault connection). A harness with no published models is + * permissive (returns true) so the schema-catalog fallback path is not over-cleared. Use to clear + * an unreachable model on harness switch. */ export function harnessAllowsModel( capabilities: HarnessCapabilitiesMap | null | undefined, harness: string | null | undefined, modelId: string | null | undefined, + customSecrets?: VaultModelSource[] | null | undefined, + slug?: string | null | undefined, ): boolean { if (!modelId) return true const caps = capsFor(capabilities, harness) @@ -363,18 +366,31 @@ export function harnessAllowsModel( const models = caps?.models const hasCatalog = Boolean(catalog && catalog.length) const hasModels = Boolean(models && Object.keys(models).length > 0) - // A harness with no published models at all is permissive (don't over-clear the schema-catalog - // fallback path). - if (!hasCatalog && !hasModels) return true if (hasCatalog && catalog!.some((e) => e.id === modelId)) return true if ( hasModels && Object.values(models!).some((ids) => Array.isArray(ids) && ids.includes(modelId)) ) return true + + if (customSecrets?.length) { + for (const secret of customSecrets) { + const secretSlug = secret.name?.trim() + const kind = secret.provider?.toLowerCase() || null + const secretModels = (secret.models ?? []).filter(Boolean) + if (!secretModels.includes(modelId)) continue + if (slug && secretSlug !== slug) continue + if (!kind || harnessReachesCustomProviderKind(capabilities, harness, kind)) return true + } + } + + // A harness with no published models at all is permissive (don't over-clear the schema-catalog + // fallback path). + if (!hasCatalog && !hasModels) return true return false } + // --------------------------------------------------------------------------- // Vault-hosted model options (Agenta-managed): a custom_provider connection's own models, // contributed to the model picker so they're selectable alongside the harness's static catalog. diff --git a/web/packages/agenta-entity-ui/tests/unit/connectionUtils.test.ts b/web/packages/agenta-entity-ui/tests/unit/connectionUtils.test.ts index 4c6b727406..2e6690dd14 100644 --- a/web/packages/agenta-entity-ui/tests/unit/connectionUtils.test.ts +++ b/web/packages/agenta-entity-ui/tests/unit/connectionUtils.test.ts @@ -256,6 +256,46 @@ describe("connectionUtils: harness-filtered model picker", () => { expect(harnessAllowsModel(CAPABILITIES, "future-harness", "anything")).toBe(true) expect(harnessAllowsModel(CAPABILITIES, "pi_core", null)).toBe(true) }) + + it("supports custom-provider vault models with non-standard ID shapes when reachable by harness", () => { + const secrets = [ + { + name: "my-bedrock", + provider: "bedrock", + models: ["custom-bedrock-model-id-123"], + }, + ] + // claude harness consumes bedrock -> returns true even with non-standard model ID shape + expect( + harnessAllowsModel( + CAPABILITIES, + "claude", + "custom-bedrock-model-id-123", + secrets, + "my-bedrock", + ), + ).toBe(true) + // pi_core harness does not consume bedrock -> returns false + expect( + harnessAllowsModel( + CAPABILITIES, + "pi_core", + "custom-bedrock-model-id-123", + secrets, + "my-bedrock", + ), + ).toBe(false) + // bogus model id not in secrets or catalog -> returns false + expect( + harnessAllowsModel( + CAPABILITIES, + "claude", + "bogus-model-id", + secrets, + "my-bedrock", + ), + ).toBe(false) + }) }) describe("connectionUtils: model_catalog is preferred when published", () => { From 2cf38ead86a5e61919d894db0014b945cf69f21d Mon Sep 17 00:00:00 2001 From: Mannie Date: Sun, 26 Jul 2026 17:26:14 +0100 Subject: [PATCH 2/4] (bug) Model picker shows a false "not available" badge, and Bedrock credential failures hang instead of failing fast - fixed --- fix-agenta-setup.sh | 44 +++++++++++++++++++ .../agentTemplate/useModelHarness.tsx | 2 +- .../tests/unit/connectionUtils.test.ts | 31 +++++++++++++ 3 files changed, 76 insertions(+), 1 deletion(-) create mode 100755 fix-agenta-setup.sh diff --git a/fix-agenta-setup.sh b/fix-agenta-setup.sh new file mode 100755 index 0000000000..0d527ae147 --- /dev/null +++ b/fix-agenta-setup.sh @@ -0,0 +1,44 @@ +#!/usr/bin/env bash +# fix-agenta-setup.sh +# Run from ~/agenta with: bash fix-agenta-setup.sh +set -e +cd "$(git rev-parse --show-toplevel)" +echo "Working directory: $(pwd)" +echo "" + +echo "=== Fix 1: Docker daemon DNS ===" +sudo tee /etc/docker/daemon.json > /dev/null <<'EOF' +{ + "ipv6": false, + "dns": ["8.8.8.8", "8.8.4.4"] +} +EOF +echo "Restarting Docker daemon..." +sudo systemctl restart docker +sleep 3 +echo "DNS fix applied ✓" +echo "" + +echo "=== Fix 2: web/oss/public ownership ===" +sudo chown -R "$(id -u):$(id -g)" web/oss/public/ +echo "Ownership fixed ✓" +ls -la web/oss/public/ +echo "" + +echo "=== Fix 3: Verify env files ===" +[[ -f "hosting/docker-compose/oss/.env.oss.dev" ]] && echo "✓ .env.oss.dev exists" || echo "✗ .env.oss.dev MISSING" +[[ -f "hosting/docker-compose/oss/.env.oss.gh" ]] && echo "✓ .env.oss.gh exists" || echo "✗ .env.oss.gh MISSING" +echo "" + +echo "=== All fixes done! Run commands below from $(pwd) ===" +echo "" +echo "Option A — full stack via Docker (dev mode, no web container):" +echo " bash ./hosting/docker-compose/run.sh --oss --dev --no-web --build \\" +echo " --env-file hosting/docker-compose/oss/.env.oss.dev" +echo "" +echo "Option B — pre-built images:" +echo " bash ./hosting/docker-compose/run.sh --oss --gh \\" +echo " --env-file hosting/docker-compose/oss/.env.oss.gh" +echo "" +echo "Frontend on host (after Option A):" +echo " cd web && pnpm dev-oss" diff --git a/web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/agentTemplate/useModelHarness.tsx b/web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/agentTemplate/useModelHarness.tsx index 8d6b6b6316..265ff0bab0 100644 --- a/web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/agentTemplate/useModelHarness.tsx +++ b/web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/agentTemplate/useModelHarness.tsx @@ -525,7 +525,7 @@ export function useModelHarness({ // different id namespaces; the provider is the reliable cross-harness signal on the config). const selectedKeepsModel = !modelId || - harnessAllowsModel(capabilities, harnessValue, modelId) || + harnessAllowsModel(capabilities, harnessValue, modelId, customSecrets, connection.slug || null) || (!!connection.provider && selectedProviders.includes(connection.provider)) const selectedIsCurrent = !!harnessValue && (savedHarnessValue ?? harnessValue) === harnessValue const selectedHarnessLabel = diff --git a/web/packages/agenta-entity-ui/tests/unit/connectionUtils.test.ts b/web/packages/agenta-entity-ui/tests/unit/connectionUtils.test.ts index 2e6690dd14..2115dfaed0 100644 --- a/web/packages/agenta-entity-ui/tests/unit/connectionUtils.test.ts +++ b/web/packages/agenta-entity-ui/tests/unit/connectionUtils.test.ts @@ -296,6 +296,37 @@ describe("connectionUtils: harness-filtered model picker", () => { ), ).toBe(false) }) + + it("selectedKeepsModel regression: vault model flagged unavailable without secrets, available with them", () => { + // Reproduces the false 'model not available' badge: the selectedKeepsModel derivation in + // useModelHarness called harnessAllowsModel WITHOUT customSecrets or slug. The function is + // correct — the call site was wrong. This test locks that in. + const secrets = [ + {name: "my-bedrock", provider: "bedrock", models: ["custom-bedrock-model-id-123"]}, + ] + // Old call (no secrets) — returns false → badge wrongly showed "model not available" + expect(harnessAllowsModel(CAPABILITIES, "claude", "custom-bedrock-model-id-123")).toBe(false) + // Fixed call (secrets + slug threaded through) — returns true → badge shows "supports your model" + expect( + harnessAllowsModel( + CAPABILITIES, + "claude", + "custom-bedrock-model-id-123", + secrets, + "my-bedrock", + ), + ).toBe(true) + // Slug mismatch → still false (the credential is for a different connection) + expect( + harnessAllowsModel( + CAPABILITIES, + "claude", + "custom-bedrock-model-id-123", + secrets, + "other-connection", + ), + ).toBe(false) + }) }) describe("connectionUtils: model_catalog is preferred when published", () => { From 19e90fe33503ec66a1cab0abe948ff1836ff49d3 Mon Sep 17 00:00:00 2001 From: Mannie Date: Tue, 4 Aug 2026 19:35:24 +0100 Subject: [PATCH 3/4] fix(frontend): enforce vault slug matching before catalog fallback --- fix-agenta-setup.sh | 44 ------------------- .../agentTemplate/useModelHarness.tsx | 8 +++- .../SchemaControls/connectionUtils.ts | 18 ++++++-- .../tests/unit/connectionUtils.test.ts | 32 ++++++++++++++ 4 files changed, 54 insertions(+), 48 deletions(-) delete mode 100755 fix-agenta-setup.sh diff --git a/fix-agenta-setup.sh b/fix-agenta-setup.sh deleted file mode 100755 index 0d527ae147..0000000000 --- a/fix-agenta-setup.sh +++ /dev/null @@ -1,44 +0,0 @@ -#!/usr/bin/env bash -# fix-agenta-setup.sh -# Run from ~/agenta with: bash fix-agenta-setup.sh -set -e -cd "$(git rev-parse --show-toplevel)" -echo "Working directory: $(pwd)" -echo "" - -echo "=== Fix 1: Docker daemon DNS ===" -sudo tee /etc/docker/daemon.json > /dev/null <<'EOF' -{ - "ipv6": false, - "dns": ["8.8.8.8", "8.8.4.4"] -} -EOF -echo "Restarting Docker daemon..." -sudo systemctl restart docker -sleep 3 -echo "DNS fix applied ✓" -echo "" - -echo "=== Fix 2: web/oss/public ownership ===" -sudo chown -R "$(id -u):$(id -g)" web/oss/public/ -echo "Ownership fixed ✓" -ls -la web/oss/public/ -echo "" - -echo "=== Fix 3: Verify env files ===" -[[ -f "hosting/docker-compose/oss/.env.oss.dev" ]] && echo "✓ .env.oss.dev exists" || echo "✗ .env.oss.dev MISSING" -[[ -f "hosting/docker-compose/oss/.env.oss.gh" ]] && echo "✓ .env.oss.gh exists" || echo "✗ .env.oss.gh MISSING" -echo "" - -echo "=== All fixes done! Run commands below from $(pwd) ===" -echo "" -echo "Option A — full stack via Docker (dev mode, no web container):" -echo " bash ./hosting/docker-compose/run.sh --oss --dev --no-web --build \\" -echo " --env-file hosting/docker-compose/oss/.env.oss.dev" -echo "" -echo "Option B — pre-built images:" -echo " bash ./hosting/docker-compose/run.sh --oss --gh \\" -echo " --env-file hosting/docker-compose/oss/.env.oss.gh" -echo "" -echo "Frontend on host (after Option A):" -echo " cd web && pnpm dev-oss" diff --git a/web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/agentTemplate/useModelHarness.tsx b/web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/agentTemplate/useModelHarness.tsx index fbef906c8a..af25b30f69 100644 --- a/web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/agentTemplate/useModelHarness.tsx +++ b/web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/agentTemplate/useModelHarness.tsx @@ -628,7 +628,13 @@ export function useModelHarness({ // different id namespaces; the provider is the reliable cross-harness signal on the config). const selectedKeepsModel = !modelId || - harnessAllowsModel(capabilities, harnessValue, modelId, customSecrets, connection.slug || null) || + harnessAllowsModel( + capabilities, + harnessValue, + modelId, + customSecrets, + connection.slug || null, + ) || (!!connection.provider && selectedProviders.includes(connection.provider)) const selectedIsCurrent = !!harnessValue && (savedHarnessValue ?? harnessValue) === harnessValue const selectedHarnessLabel = diff --git a/web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/connectionUtils.ts b/web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/connectionUtils.ts index 0f1d8bf9f4..9a86ea4714 100644 --- a/web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/connectionUtils.ts +++ b/web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/connectionUtils.ts @@ -376,6 +376,21 @@ export function harnessAllowsModel( slug?: string | null | undefined, ): boolean { if (!modelId) return true + if (slug) { + if (customSecrets?.length) { + for (const secret of customSecrets) { + const secretSlug = secret.name?.trim() + const kind = secret.provider?.toLowerCase() || null + const secretModels = (secret.models ?? []).filter(Boolean) + if (!secretModels.includes(modelId)) continue + if (secretSlug !== slug) continue + if (!kind || harnessReachesCustomProviderKind(capabilities, harness, kind)) + return true + } + } + return false + } + const caps = capsFor(capabilities, harness) const catalog = caps?.model_catalog const models = caps?.models @@ -390,11 +405,9 @@ export function harnessAllowsModel( if (customSecrets?.length) { for (const secret of customSecrets) { - const secretSlug = secret.name?.trim() const kind = secret.provider?.toLowerCase() || null const secretModels = (secret.models ?? []).filter(Boolean) if (!secretModels.includes(modelId)) continue - if (slug && secretSlug !== slug) continue if (!kind || harnessReachesCustomProviderKind(capabilities, harness, kind)) return true } } @@ -405,7 +418,6 @@ export function harnessAllowsModel( return false } - // --------------------------------------------------------------------------- // Vault-hosted model options (Agenta-managed): a custom_provider connection's own models, // contributed to the model picker so they're selectable alongside the harness's static catalog. diff --git a/web/packages/agenta-entity-ui/tests/unit/connectionUtils.test.ts b/web/packages/agenta-entity-ui/tests/unit/connectionUtils.test.ts index 2115dfaed0..94eab8c028 100644 --- a/web/packages/agenta-entity-ui/tests/unit/connectionUtils.test.ts +++ b/web/packages/agenta-entity-ui/tests/unit/connectionUtils.test.ts @@ -297,6 +297,38 @@ describe("connectionUtils: harness-filtered model picker", () => { ).toBe(false) }) + it("requires a specific vault connection to explicitly support a model when slug is provided, skipping generic catalog checks (name collision)", () => { + const secrets = [ + {name: "my-custom-conn", provider: "bedrock", models: ["other-model"]}, + ] + // "opus" is in the claude catalog. + // A generic check (no slug) for "opus" returns true. + expect(harnessAllowsModel(CAPABILITIES, "claude", "opus")).toBe(true) + + // But if we specifically ask whether "my-custom-conn" (which only supports "other-model") + // allows "opus", it must return false, not falling back to the catalog. + expect( + harnessAllowsModel( + CAPABILITIES, + "claude", + "opus", + secrets, + "my-custom-conn", + ), + ).toBe(false) + + // And it should return true for the model it actually supports + expect( + harnessAllowsModel( + CAPABILITIES, + "claude", + "other-model", + secrets, + "my-custom-conn", + ), + ).toBe(true) + }) + it("selectedKeepsModel regression: vault model flagged unavailable without secrets, available with them", () => { // Reproduces the false 'model not available' badge: the selectedKeepsModel derivation in // useModelHarness called harnessAllowsModel WITHOUT customSecrets or slug. The function is From d4ee6e104b1f8900dc2c7c559d3a8e4c5a082c10 Mon Sep 17 00:00:00 2001 From: Kaosiso Ezealigo Date: Mon, 10 Aug 2026 14:28:55 +0200 Subject: [PATCH 4/4] chore: fix test formatting, drop unrelated CONTRIBUTING.md edit - eslint --fix on connectionUtils.test.ts (prettier formatting only, no logic change) - CONTRIBUTING.md: reverted to main; the added Quickstart section told contributors to run pnpm from the repo root, which has no package.json (the workspace lives under web/) and would fail immediately --- CONTRIBUTING.md | 82 ++++++------------- .../tests/unit/connectionUtils.test.ts | 42 +++------- 2 files changed, 35 insertions(+), 89 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 99bd36b4f3..d4096c11f8 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -3,74 +3,38 @@ title: "Contributing to Agenta" description: "Guidelines for contributing to the Agenta project" --- -Thanks for your interest in contributing to Agenta! +Thanks for your interest in contributing to Agenta. The contributor docs are the main source of truth for how to get started, run the project locally, test your changes, and open a pull request. -## Quick Links +Start here: -- [Contributor overview](https://agenta.ai/docs/contributing/overview) -- [Creating your first PR](https://agenta.ai/docs/contributing/first-pr) -- [Development mode](https://agenta.ai/docs/contributing/guides/development-mode) -- [Testing](https://agenta.ai/docs/contributing/guides/testing) +- [Contributor overview](https://agenta.ai/docs/contributing/overview) +- [Creating your first PR](https://agenta.ai/docs/contributing/first-pr) +- [Development mode](https://agenta.ai/docs/contributing/guides/development-mode) +- [Testing](https://agenta.ai/docs/contributing/guides/testing) - [Formatting and linting](https://agenta.ai/docs/contributing/guides/formatting-and-linting) - [Slack community](https://join.slack.com/t/agenta-hq/shared_invite/zt-37pnbp5s6-mbBrPL863d_oLB61GSNFjw) -## Quickstart & Local Development - -1. **Clone the Repository**: - ```bash - git clone https://github.com/agenta-ai/agenta.git - cd agenta - ``` - -2. **Install Dependencies**: - ```bash - pnpm install - ``` - -3. **Start Development Server**: - ```bash - pnpm dev - ``` - -4. **Lint & Test**: - ```bash - pnpm lint - pnpm test - ``` - -## Branching & Commit Conventions - -- **Branch Naming**: Use clear prefixes for branch names: - - `feat/feature-name` for new features - - `fix/issue-description` for bug fixes - - `docs/topic-name` for documentation updates -- **Commit Messages**: Follow [Conventional Commits](https://www.conventionalcommits.org/) standards (e.g., `feat: add user evaluation workflow`, `fix: resolve API timeout issue`). - ## Pull Requests Before you request review, make sure your pull request: -- Explains what changed and why. -- Includes a short demo (video or screenshot) for UI changes. -- Lists what you tested locally. -- Notes what still needs QA. -- Passes all formatting, linting, and test checks locally (`pnpm lint`, `pnpm test`). - -## Contribution Rules - -We had many inactive issues and pull requests in the past. To keep work moving: - -- **Issue Assignments**: An issue may only be assigned to one person for up to **one week** (three days for very simple issues). If the issue remains unsolved after a week, it will be unassigned and made available to others. -- **Pull Request Activity**: Any pull request left inactive by the author for over **one week** may be closed. The author can reopen it later and continue the work. - -## Contributor License Agreement (CLA) - -If you want to contribute, you need to sign the Contributor License Agreement. This helps us avoid intellectual property problems in the future. - +- explains what changed and why +- includes a short demo for UI changes +- lists what you tested locally +- notes what still needs QA +- passes the relevant formatting, linting, and test checks locally + +## Contribution Rules + +We had many inactive issues and pull requests in the past. To keep work moving: + +- An issue may only be assigned to one person for up to one week (three days for very simple issues). If the issue remains unsolved after a week, it will be unassigned and made available to others. +- Any pull request left inactive by the author for over a week may be closed. The author can reopen it later and continue the work. + +## Contributor License Agreement + +If you want to contribute, you need to sign the Contributor License Agreement. This helps us avoid intellectual property problems in the future. + After you open a pull request, a bot will comment with a link. Sign the agreement there with your GitHub account. - -## Security Vulnerabilities - -If you discover a security vulnerability within Agenta, please do **not** open a public issue. Instead, report it privately via GitHub Security Advisories or contact the maintainers directly on Slack. diff --git a/web/packages/agenta-entity-ui/tests/unit/connectionUtils.test.ts b/web/packages/agenta-entity-ui/tests/unit/connectionUtils.test.ts index 94eab8c028..f769e38acc 100644 --- a/web/packages/agenta-entity-ui/tests/unit/connectionUtils.test.ts +++ b/web/packages/agenta-entity-ui/tests/unit/connectionUtils.test.ts @@ -287,45 +287,25 @@ describe("connectionUtils: harness-filtered model picker", () => { ).toBe(false) // bogus model id not in secrets or catalog -> returns false expect( - harnessAllowsModel( - CAPABILITIES, - "claude", - "bogus-model-id", - secrets, - "my-bedrock", - ), + harnessAllowsModel(CAPABILITIES, "claude", "bogus-model-id", secrets, "my-bedrock"), ).toBe(false) }) it("requires a specific vault connection to explicitly support a model when slug is provided, skipping generic catalog checks (name collision)", () => { - const secrets = [ - {name: "my-custom-conn", provider: "bedrock", models: ["other-model"]}, - ] - // "opus" is in the claude catalog. + const secrets = [{name: "my-custom-conn", provider: "bedrock", models: ["other-model"]}] + // "opus" is in the claude catalog. // A generic check (no slug) for "opus" returns true. expect(harnessAllowsModel(CAPABILITIES, "claude", "opus")).toBe(true) - - // But if we specifically ask whether "my-custom-conn" (which only supports "other-model") + + // But if we specifically ask whether "my-custom-conn" (which only supports "other-model") // allows "opus", it must return false, not falling back to the catalog. - expect( - harnessAllowsModel( - CAPABILITIES, - "claude", - "opus", - secrets, - "my-custom-conn", - ), - ).toBe(false) + expect(harnessAllowsModel(CAPABILITIES, "claude", "opus", secrets, "my-custom-conn")).toBe( + false, + ) // And it should return true for the model it actually supports expect( - harnessAllowsModel( - CAPABILITIES, - "claude", - "other-model", - secrets, - "my-custom-conn", - ), + harnessAllowsModel(CAPABILITIES, "claude", "other-model", secrets, "my-custom-conn"), ).toBe(true) }) @@ -337,7 +317,9 @@ describe("connectionUtils: harness-filtered model picker", () => { {name: "my-bedrock", provider: "bedrock", models: ["custom-bedrock-model-id-123"]}, ] // Old call (no secrets) — returns false → badge wrongly showed "model not available" - expect(harnessAllowsModel(CAPABILITIES, "claude", "custom-bedrock-model-id-123")).toBe(false) + expect(harnessAllowsModel(CAPABILITIES, "claude", "custom-bedrock-model-id-123")).toBe( + false, + ) // Fixed call (secrets + slug threaded through) — returns true → badge shows "supports your model" expect( harnessAllowsModel(