The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
fix(e2e): no named 'mock' provider anywhere
ethernet74ca0082603f
diff --git a/apps/desktop/e2e/fixtures.ts b/apps/desktop/e2e/fixtures.tsindex 1f8c6db7555..fc3f884588e 100644--- a/apps/desktop/e2e/fixtures.ts+++ b/apps/desktop/e2e/fixtures.ts@@ -409,26 +409,11 @@ export interface DeadBackendOptions {*/export async function setupDeadBackend(options: DeadBackendOptions = {}): Promise<DeadBackendFixture> {const sandbox = createSandbox('dead')- const configPath = path.join(sandbox.hermesHome, 'config.yaml')- fs.writeFileSync(- configPath,- `# Auto-generated by E2E test fixtures — dead provider-model:- default: mock-model- provider: mock-providers:- mock:- api: http://127.0.0.1:1/v1- name: Mock- api_mode: chat_completions- key_env: MOCK_API_KEY- models:- mock-model: {}- context_length: 64000-`,- 'utf8',- )- writeEnvFile(sandbox.hermesHome)+ // Same writer the install-e2e harness uses, pointed at a dead endpoint: one+ // shape for "an external OpenAI-compatible provider", never a named 'mock'.+ const deadUrl = 'http://127.0.0.1:1'+ writeMockProviderConfig(sandbox.hermesHome, deadUrl)+ writeEnvFile(sandbox.hermesHome, 'e2e-mock-key', deadUrl)const env = buildAppEnv(sandbox, options.fakeError ? { HERMES_DESKTOP_BOOT_FAKE_ERROR: 'Failed to connect to Hermes backend: connection refused' } : {})const { app, page } = await launchDesktop(env)diff --git a/tests-js/scripts/desktop-smoke.test.ts b/tests-js/scripts/desktop-smoke.test.tsindex 7413da72319..0569bb39317 100644--- a/tests-js/scripts/desktop-smoke.test.ts+++ b/tests-js/scripts/desktop-smoke.test.ts@@ -53,7 +53,7 @@ test('provider reconfiguration preserves feed, plugins, history and explicit fixexpect(yaml.load(fs.readFileSync(path.join(home, 'config.yaml'), 'utf8'))).toMatchObject({updates: feed, plugins: { witness: true },model: { provider: 'custom', temperature: 0.7, context_length: 12000 },- providers: { mock: { api: 'http://127.0.0.1:9001/v1', context_length: 64000 } },+ providers: {},auxiliary: { title_generation: { enabled: false } }, approvals: { mode: 'smart' }, display: { interim_assistant_messages: true },})expect(fs.readFileSync(path.join(home, '.env'), 'utf8')).toBe('OTHER_TEST_VALUE=kept\nMOCK_API_KEY=e2e-mock-key\n')diff --git a/tests-js/scripts/mock-provider-config.ts b/tests-js/scripts/mock-provider-config.tsindex 76ab1b9013e..785366a473c 100644--- a/tests-js/scripts/mock-provider-config.ts+++ b/tests-js/scripts/mock-provider-config.ts@@ -40,10 +40,12 @@ export function writeMockProviderConfig(const merged = {...config,model: { ...config.model, default: 'mock-model', provider: 'custom', context_length: modelContextLength ?? 64000 },- providers: {- ...config.providers,- mock: { api: `${url}/v1`, name: 'Mock', api_mode: 'chat_completions', key_env: 'MOCK_API_KEY', models: { 'mock-model': {} }, context_length: 64000 },- },+ // No named provider block: "an external OpenAI-compatible endpoint" is+ // expressed by provider 'custom' + OPENAI_BASE_URL/OPENAI_API_KEY (written+ // by writeEnvFile). A provider named 'mock' only resolved on trees that+ // had registered such a profile, so older refs died with "Unknown+ // provider 'mock'".+ providers: { ...config.providers },auxiliary: { ...config.auxiliary, title_generation: { ...config.auxiliary?.title_generation, enabled: false } },approvals: { ...config.approvals, mode: 'off' },...extra,