Qoder: Teams accounts show no member quota and miss organization resource packages

Abierto
#5,103 3 comentarios 1 reacción 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

@gushan1wood ya está trabajando en esto.

Desde el 21/11/2026.

  • #5140 de @gushan1wood — abierto

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
52/100
Tipo de issue
Nueva funcionalidad
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
swift

Línea de trabajo

Start by reading the existing Qoder provider implementation from #1736 and the Warp add-on credit precedent in #3634. Compare the member credit response with the organization-shared usage or usage presentation response described here, keeping the member-visible shared quota separate from the organization-wide pool. Done means Teams accounts show distinct credit pools, use the plan refresh time and exhaustion status, and personal accounts retain the existing member summary.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster no-stale P2

Summary

CodexBar's Qoder provider reads only the member credit endpoint. On a Qoder Teams/organization account, that response reports no member quota, so CodexBar shows a zero quota while Qoder's own Settings → Usage page shows a non-zero organization resource package (the shared add-on credit pool).

This is the Teams/organization surface of the existing Qoder provider, not a new provider.

Environment

  • CodexBar 0.84.1 (current main)
  • macOS 27.x, Apple Silicon
  • Provider: Qoder, site qoder.com (international), browser cookie session
  • Account type: Teams / organization
  • Qoder web: Settings → Usage

Steps to reproduce

  1. Sign in to qoder.com with a Teams account that has an organization resource package.
  2. Enable Qoder in CodexBar with Automatic or Manual browser cookies.
  3. Refresh Qoder.
  4. Compare CodexBar with Settings → Usage on the Qoder website.

Expected

  • Show the organization resource package / add-on credits (used, cap, remaining, percentage).
  • Use the plan's refresh date, not the stale reset carried by the member response.
  • Keep plan and add-on pools distinguishable.
  • Do not report exhausted while any pool has remaining credits.

Actual

  • CodexBar shows a zero quota for Qoder.
  • No resource-package / add-on row.
  • The reset date comes from the member response and is stale.

Data sources (redacted)

All requests used the existing browser cookie session.

Request Observed shape
Member credit endpoint (/api/v2/me/usages/big_model_credits) all member pools (plan_quota, resource_package_quota, dedicated_resource_package_quota, total_quota) report no quota
Organization-shared usage endpoint (/api/v1/me/organization-shared-usages/big_model_credits) shared_quota with a non-zero used/cap/remaining; separate organization_pool
Usage presentation endpoint (/sash/api/v2/me/usage) displayMode: "qoder"; userQuota empty; orgResourcePackage non-zero; expiresAt / refreshAt = plan refresh; isQuotaExceeded: false

Redacted response shape (non-zero values replaced with placeholders):

{
  "displayMode": "qoder",
  "qoderUsage": {
    "userType": "<account type>",
    "usageType": "credits",
    "isQuotaExceeded": false,
    "expiresAt": "<plan refresh timestamp>",
    "refreshAt": "<plan refresh timestamp>",
    "userQuota": {
      "total": 0,
      "used": 0,
      "remaining": 0,
      "percentage": 0,
      "unit": "credits"
    },
    "orgResourcePackage": {
      "cap": "<non-zero cap>",
      "used": "<non-zero used>",
      "remaining": "<non-zero remaining>",
      "percentage": "<fraction 0-1>",
      "unit": "credits",
      "available": true
    },
    "isPlanQuotaProrated": false
  }
}

orgResourcePackage.percentage is a fraction (0–1), not a percentage.

Proposed fix

  • Keep the current member endpoint as the fallback.
  • Add an optional same-origin request to the organization-shared usage endpoint or the usage presentation endpoint, using the existing cookie.
  • Surface orgResourcePackage / addOnQuota / dedicatedResourcePackages as additional credit windows; do not silently merge them into a zero plan.
  • Use the plan refresh timestamp for the reset and isQuotaExceeded for exhaustion.
  • For personal accounts, continue using the existing member summary.

Scope

  • Data-coverage fix for the existing Qoder provider, not a new provider.
  • Uses the existing browser cookie session; no new credential type.
  • Do not display the org-wide pool as the member's quota; use the member-visible shared quota.
  • Enterprise display mode can be a follow-up if needed.

Related

  • #1590 — original Qoder provider request; the maintainer asked whether this covers the individual dashboard or the Teams API.
  • #1736 — Qoder provider implementation; folds sharedQuota only when it appears in the member response.
  • #4686 — Qoder CN support.
  • #3634 — Warp add-on credits precedent.
Lenguaje dominante
Swift
Estrellas
23.3k
Forks
2.2k
Merge medio
1 d 18 h
PR fusionados (30 d)
231

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de steipete/CodexBar

Todos los issues de steipete/CodexBar

Issues similares

Más issues de Swift

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.