{"record":{"id":"bc138cf6847908a0","repo":"coleam00/Archon","slug":"copilot-model-access-error-combined-try-a-dif","errorCode":null,"errorMessage":"Copilot model access error: ${combined}\n\nTry a different model in the workflow node or set assistants.copilot.model in .archon/config.yaml.","messagePattern":"Copilot model access error: (.+?)\n\nTry a different model in the workflow node or set assistants\\.copilot\\.model in \\.archon/config\\.yaml\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/providers/src/community/copilot/provider.ts","lineNumber":620,"sourceCode":"        skills: sessionConfig.skillDirectories?.length ?? 0,\n        agents: sessionConfig.customAgents?.length ?? 0,\n        tokenSource,\n        resumed: resumeSessionId !== undefined && !resumeFailed,\n      },\n      'copilot.session_started'\n    );\n\n    try {\n      yield* bridgeSession(\n        session,\n        effectivePrompt,\n        requestOptions?.abortSignal,\n        wantsStructured ? outputFormat.schema : undefined\n      );\n      log.info({ sessionId: session.sessionId }, 'copilot.prompt_completed');\n    } catch (err) {\n      log.error({ err, sessionId: session.sessionId }, 'copilot.prompt_failed');\n      throw buildFriendlyCopilotError(err);\n    } finally {\n      // Stop the client so its CLI subprocess shuts down; bridgeSession already\n      // handled session.abort() + session.disconnect() in its own finally.\n      try {\n        const stopErrors = await client.stop();\n        if (stopErrors.length > 0) {\n          log.warn({ errors: stopErrors.map(e => e.message) }, 'copilot.client_stop_errors');\n        }\n      } catch (stopErr) {\n        log.debug({ err: stopErr }, 'copilot.client_stop_threw');\n      }\n    }\n  }\n}\n","sourceCodeStart":602,"sourceCodeEnd":635,"githubUrl":"https://github.com/coleam00/Archon/blob/0773b9745896ef0612e709c80845a0f7db315b19/packages/providers/src/community/copilot/provider.ts#L602-L635","documentation":"buildFriendlyCopilotError classifies Copilot provider failures, and model-access errors produce this message combining the thrown error with any lastSessionError collected from the SDK's session.error event (which often carries the specific detail while the thrown error is generic). It means GitHub Copilot refused access to the configured model and points at assistants.copilot.model in .archon/config.yaml as the knob to change.","triggerScenarios":"sendQuery's prompt call fails because the Copilot CLI/SDK reports the account or subscription is not entitled to the requested model — model name typo'd, premium-model request on a free plan, org policy blocking the model, or a model id deprecated/renamed by GitHub.","commonSituations":"Workflow node requests a model not enabled for the user's Copilot plan; enterprise policy disables premium models; config references a model id GitHub renamed; entitlement changed after a subscription downgrade.","solutions":["Set assistants.copilot.model in .archon/config.yaml to a model your Copilot plan supports (e.g. gpt-4o).","Check the `combined` detail after the prefix for the exact model-id complaint.","Verify your Copilot subscription/entitlements include the requested model; premium models require a paid tier.","If an organization manages the account, confirm policy allows premium model requests."],"exampleFix":"# before\nassistants:\n  copilot:\n    model: claude-opus-4-5\n# after\nassistants:\n  copilot:\n    model: gpt-4o","handlingStrategy":"validation","validationCode":"// before running Copilot nodes\nimport { config } from './config';\nconst model = config.assistants?.copilot?.model ?? 'gpt-4o';\nconst allowedModels = ['gpt-4o', 'gpt-4.1', 'o3-mini']; // models entitled on your plan\nif (!allowedModels.includes(model)) {\n  throw new Error(`Copilot model ${model} not in entitled list; set assistants.copilot.model`);\n}","typeGuard":null,"tryCatchPattern":"try {\n  await runCopilotNode(node);\n} catch (err) {\n  if (err instanceof Error && err.message.startsWith('Copilot model access error:')) {\n    // fall back to a known-entitled model, or stop with a config pointer\n    throw new Error('Update assistants.copilot.model in .archon/config.yaml to an entitled model');\n  }\n  throw err;\n}","preventionTips":["Pin assistants.copilot.model to a model your Copilot plan actually entitles.","After GitHub renames or deprecates models, update config before scheduled runs.","Verify org policy allows the model class (premium models need paid tiers).","Test one small Copilot run after subscription or seat changes."],"tags":["copilot","github","model-access","configuration"],"backgroundTag":"model-access-denied","analyzedSha":"0773b9745896ef0612e709c80845a0f7db315b19","analyzedAt":"2026-09-01T02:28:07.064Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T05:18:18.240Z"}