Skip to content

feat: add Nano-GPT provider across app and CLI#76

Merged
kargnas merged 4 commits intoopgginc:mainfrom
Daltonganger:feat/nano-gpt-provider
Feb 14, 2026
Merged

feat: add Nano-GPT provider across app and CLI#76
kargnas merged 4 commits intoopgginc:mainfrom
Daltonganger:feat/nano-gpt-provider

Conversation

@Daltonganger
Copy link
Contributor

Summary

  • add Nano-GPT as a new quota-based provider across the app and CLI, including auth parsing and provider registration
  • fetch Nano-GPT subscription usage and balances with daily/monthly reset support, and surface usage windows in the provider submenu
  • add an offline Nano-GPT icon asset, wire status/menu icon mappings, and add tests for provider behavior and identifier/display coverage

Verification

  • xcodebuild test -project "CopilotMonitor/CopilotMonitor.xcodeproj" -scheme "CopilotMonitor" -destination 'platform=macOS'
  • xcodebuild -project "CopilotMonitor/CopilotMonitor.xcodeproj" -scheme "opencodebar-cli" -destination 'platform=macOS' build
  • /usr/local/bin/opencodebar list

Integrate Nano-GPT as a quota-based provider with daily/monthly reset tracking, local icon assets, and auth parsing support. Add UI/CLI wiring and tests so Nano-GPT usage, balances, and the  subscription preset are available end-to-end.
@op-gg-ai-devops
Copy link
Contributor

Integrating Nano-GPT provider support into the app and CLI with usage tracking, balance checks, and UI updates.

Creating DateFormatters inside formatISO8601 every time is a rookie move affecting performance; make those suckers static constants. Also, your tests are basically useless in CI because they skip if a real API key isn't found—mock the auth so the logic actually verifies something. That said, the flexible decoding strategy for the API response types is actually pretty solid defensive coding.


This is just a preview, dude. For a detailed, line-by-line code review (including bug detection and security checks), please write a comment like @opgginc/op-gg-ai-devops review this or add @opgginc/op-gg-ai-devops team as a Reviewer.

@Daltonganger
Copy link
Contributor Author

@opgginc/op-gg-ai-devops review this

@op-gg-ai-devops
Copy link
Contributor

⚠️ AI 리뷰를 요청하려면 이 레포지토리에 대한 쓰기 권한이 필요합니다.

@golammowela251wq
Copy link

@copilot review this!

@kargnas kargnas requested a review from a team February 13, 2026 03:53
@kargnas
Copy link
Member

kargnas commented Feb 13, 2026

@opgginc/op-gg-ai-devops

@opgginc opgginc deleted a comment from op-gg-ai-devops bot Feb 13, 2026
@op-gg-ai-devops
Copy link
Contributor

op-gg-ai-devops bot commented Feb 13, 2026

❌ AI Code Review Cancelled

Newer commit detected or workflow was manually cancelled.


📋 View Logs | 🤖 Model: openai/gpt-5.2-codex

op-gg-ai-devops[bot] and others added 2 commits February 13, 2026 04:15
Co-authored-by: Daltonganger <r.beuker@ziggo.nl>
…resolution

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
@op-gg-ai-devops
Copy link
Contributor

op-gg-ai-devops bot commented Feb 13, 2026

✅ AI Code Review Completed

Status Task Result
Collect repo/PR context, diffs, and existing bot reviews; lock review language Context gathered and language locked.
Analyze changes, dependencies, docs, and run required installs/tests safely for fork PR Changes analyzed; dependency install/tests skipped where not applicable.
Draft review with inline suggestions, post via gh api, update status comment Review posted with inline feedback.

Review posted with one performance suggestion and CI still running. Dependency install and smoke tests were skipped due to missing lockfiles and macOS/Xcode. Follow up once CI finishes.

Reviewed with openai/gpt-5.2-codex


📋 View Full Logs

Copy link
Contributor

@op-gg-ai-devops op-gg-ai-devops bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 OP.GG DevOps AI Code Review

Overview

  • Adds Nano-GPT provider support across app/CLI, assets, and API docs.

Findings

  • See inline comment about reducing fetch latency by running independent requests in parallel.

CI/CD Status

  • In progress: CI, Build and Release, Test.
  • Passed: Lint.

Tests

  • Dependency install skipped (no JS lockfiles found).
  • Smoke tests not run here (macOS/Xcode not available in this environment).

Default Review Language

  • Set this in AGENTS.md. Example: Default review language: English.

The bot will automatically re-review the entire PR when new commits are pushed.
Mention @opgginc/op-gg-ai-devops in a PR comment to trigger another review with focus, e.g.:

  1. @opgginc/op-gg-ai-devops check Nano-GPT fetch latency changes
  2. @opgginc/op-gg-ai-devops review Nano-GPT docs for accuracy
  3. @opgginc/op-gg-ai-devops scan for missing tests in Nano-GPT provider

Co-authored-by: op-gg-ai-devops[bot] <255644809+op-gg-ai-devops[bot]@users.noreply.github.com>
@op-gg-ai-devops
Copy link
Contributor

op-gg-ai-devops bot commented Feb 13, 2026

✅ AI Code Review Completed

The review of the Nano-GPT provider implementation is finished, confirming solid architecture and code quality. Suggestions for improved testability and performance have been added. CI/CD checks for linting passed, while tests are currently in progress.

Review Progress
  • Initialize review plan and verify repository language settings (AGENTS.md)
  • Fetch and analyze the git diff (20a4f5b...89b1aa8)
  • Analyze changed files for code quality, security, and logic issues
  • Check for CI/CD status and build/test results
  • Draft and post the review using gh api
  • Update the status comment to 'Completed'

Reviewed with google/gemini-3-pro-preview


📋 View Full Logs

Copy link
Contributor

@op-gg-ai-devops op-gg-ai-devops bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 OP.GG DevOps AI Code Review

Summary

This PR introduces the Nano-GPT provider, fully integrating it into both the App and CLI. The changes include:

  • Core Logic: NanoGptProvider implementation with concurrent fetching of usage and balance.
  • Integration: Updates to ProviderManager, CLIProviderManager, and StatusBarController.
  • UI: New menu items for daily/monthly quotas and balance display.
  • Documentation: Updates to README.md and API references.

The implementation aligns well with the project's architecture, using actor-based concurrency and robust JSON decoding for loose types.

CI/CD Status

  • Lint: ✅ Passed
  • Test / Build: 🔄 In Progress

Suggestions

I have added inline comments regarding:

  1. Testability: Making the provider testable in CI without real API keys.
  2. Performance: Reusing ISO8601DateFormatter instances.

Please check the inline comments for details.


Note: Please add Default review language: English to AGENTS.md to explicitly set the review language preference.

}

func testFetchSuccessCreatesProviderResult() async throws {
guard TokenManager.shared.getNanoGptAPIKey() != nil else {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tests should ideally run in CI without verifying against a real environment configuration.

Consider refactoring NanoGptProvider to accept an optional API key in its initializer (or inject a mockable TokenManager). This would allow you to pass a dummy key during testing and verify the logic without skipping.

Example refactor idea:

init(tokenManager: TokenManager = .shared, session: URLSession = .shared, apiKey: String? = nil) { ... }

let formatterWithFractional = ISO8601DateFormatter()
formatterWithFractional.formatOptions = [.withInternetDateTime, .withFractionalSeconds]

let formatterWithoutFractional = ISO8601DateFormatter()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Creating ISO8601DateFormatter is expensive. Since this method may be called frequently, consider making these formatters static properties to reuse instances.

Example:

    private static let formatterWithFractional: ISO8601DateFormatter = {
        let formatter = ISO8601DateFormatter()
        formatter.formatOptions = [.withInternetDateTime, .withFractionalSeconds]
        return formatter
    }()

    private static let formatterWithoutFractional: ISO8601DateFormatter = {
        let formatter = ISO8601DateFormatter()
        formatter.formatOptions = [.withInternetDateTime]
        return formatter
    }()

Then use Self.formatterWithFractional inside the function.

@kargnas kargnas merged commit 03d2f24 into opgginc:main Feb 14, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Comments