Add GitHub Copilot as LLM provider (#637)#663
Conversation
🚀 Preview Deployment
Preview will be automatically removed when this PR is closed. |
1c57d5e to
bce1e92
Compare
There was a problem hiding this comment.
14 issues found across 3000 files
Note: This PR contains a large number of files. cubic only reviews up to 75 files per PR, so some files may not have been reviewed. cubic prioritises the most important files to review.
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="cli/test_venv/Lib/site-packages/anyio/_core/_tempfile.py">
<violation number="1" location="cli/test_venv/Lib/site-packages/anyio/_core/_tempfile.py:368">
P1: `readinto()`/`readinto1()` on unrolled spooled files read twice because the fast path drops the return value and falls through to `super()`. `readinto1()` also calls `readinto()` instead of `readinto1()` in the fast path.</violation>
</file>
<file name="cli/test_venv/Lib/site-packages/anyio/_core/_subprocesses.py">
<violation number="1" location="cli/test_venv/Lib/site-packages/anyio/_core/_subprocesses.py:87">
P1: Falsy `input` breaks empty-bytes stdin handling, so `input=b''` is treated like no input and can leave the child waiting for EOF.</violation>
<violation number="2" location="cli/test_venv/Lib/site-packages/anyio/_core/_subprocesses.py:179">
P1: `extra_groups` is ignored because `group` is assigned to `kwargs["extra_groups"]` instead of the `extra_groups` argument.</violation>
</file>
<file name="cli/test_venv/Lib/site-packages/_editable_impl_nao_core.pth">
<violation number="1" location="cli/test_venv/Lib/site-packages/_editable_impl_nao_core.pth:1">
P1: Committed machine-specific absolute path in a `.pth` file breaks portability and test reproducibility.</violation>
</file>
<file name="cli/test_venv/Lib/site-packages/anyio/_core/_synchronization.py">
<violation number="1" location="cli/test_venv/Lib/site-packages/anyio/_core/_synchronization.py:243">
P1: Condition.release() leaves `_owner_task` stale, so ownership checks can succeed after the lock has been released.</violation>
<violation number="2" location="cli/test_venv/Lib/site-packages/anyio/_core/_synchronization.py:672">
P1: CapacityLimiterAdapter incorrectly rejects `total_tokens=0`, even though the API explicitly supports zero-token limiters.</violation>
</file>
<file name="cli/test_venv/Lib/site-packages/_pytest/_io/terminalwriter.py">
<violation number="1" location="cli/test_venv/Lib/site-packages/_pytest/_io/terminalwriter.py:1">
P1: A virtualenv `site-packages` file was committed into the repo, introducing duplicated/stale dependency code and potential import-shadowing risk.</violation>
</file>
<file name="cli/test_venv/Lib/site-packages/_pytest/capture.py">
<violation number="1" location="cli/test_venv/Lib/site-packages/_pytest/capture.py:2">
P1: A full virtualenv `site-packages` copy (including `_pytest` internals) was committed, creating duplicate dependency code with version-drift and import-shadowing risk.</violation>
</file>
<file name="cli/test_venv/Lib/site-packages/_pytest/_code/code.py">
<violation number="1" location="cli/test_venv/Lib/site-packages/_pytest/_code/code.py:1">
P1: A full virtualenv `site-packages` tree was committed (`cli/test_venv/...`), introducing duplicated vendored dependencies that can drift from declared package management and increase maintenance/security risk.</violation>
</file>
<file name="cli/test_venv/Lib/site-packages/_pytest/_io/pprint.py">
<violation number="1" location="cli/test_venv/Lib/site-packages/_pytest/_io/pprint.py:2">
P1: A full virtualenv/site-packages tree was committed, introducing unmanaged third-party code in-repo and risking dependency drift.</violation>
</file>
<file name="cli/test_venv/Lib/site-packages/_pytest/fixtures.py">
<violation number="1" location="cli/test_venv/Lib/site-packages/_pytest/fixtures.py:1">
P1: A full virtualenv `site-packages` dependency tree is being committed, creating duplicate/stale dependency source-of-truth risk (including pytest internals).</violation>
</file>
<file name="cli/test_venv/Lib/site-packages/_pytest/_py/path.py">
<violation number="1" location="cli/test_venv/Lib/site-packages/_pytest/_py/path.py:2">
P1: A full virtualenv/site-packages copy (including pytest internals) was committed, creating a duplicate and potentially stale dependency source in the repo.</violation>
</file>
<file name="cli/test_venv/Lib/site-packages/_pytest/logging.py">
<violation number="1" location="cli/test_venv/Lib/site-packages/_pytest/logging.py:1">
P1: A committed virtualenv `site-packages` file was added, introducing duplicated third-party code that can drift from managed dependencies and become stale.</violation>
</file>
<file name="cli/test_venv/Lib/site-packages/anyio/_backends/_trio.py">
<violation number="1" location="cli/test_venv/Lib/site-packages/anyio/_backends/_trio.py:1">
P1: A full virtualenv `site-packages` dependency file was added to the repo, which introduces dependency drift and maintenance risk instead of relying on managed package versions.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
37d9d16 to
4bff514
Compare
- CLI: interactive config with configurable headers - Backend: OpenAI-compatible API wrapper integration - Types: proper TypeScript definitions Closes getnao#637
4bff514 to
8a22cef
Compare
|
Did you test it? |
|
Yeah the exact details are mentioned. Tested it with my Github personal access token. |
|
CI still failing :'( |
|
Hey @Bl3f The lock file correctly specifies @esbuild/* at 0.25.12, but CI has cached 0.27.7. This seems like a CI cache issue, not a code problem. Clearing the cache might fix it ig. |
Summary
Implements GitHub Copilot as a supported LLM provider, enabling users to leverage GitHub's inference API with their existing GitHub PAT tokens (with
models:readscope).Changes
CLI (
cli/nao_core/)Backend (
apps/backend/src/)Shared (
apps/shared/src/)Design Decisions
Testing & Validation
Backend Compilation
npm run lintpasses (TypeScript: 0 errors, ESLint: 2 pre-existing unrelated warnings)CLI Integration
nao initworkflowEnd-to-End Connectivity Test
Executed
nao initwith test project configuration:Verified with actual GitHub PAT token with models:read scope.
Verification
Notes
Closes #637