Spaces:
Running on CPU Upgrade
Running on CPU Upgrade
Remove inference usage link from usage popover (#298)
Browse files* Remove inference usage link
Co-authored-by: OpenAI Codex <codex@openai.com>
* Document GitHub CLI usage
Co-authored-by: OpenAI Codex <codex@openai.com>
* Remove unused inference usage link
Co-authored-by: OpenAI Codex <codex@openai.com>
---------
Co-authored-by: OpenAI Codex <codex@openai.com>
- AGENTS.md +1 -0
- backend/usage.py +0 -2
- frontend/src/components/UsageMeter.tsx +0 -5
AGENTS.md
CHANGED
|
@@ -22,6 +22,7 @@ Notes:
|
|
| 22 |
|
| 23 |
## GitHub CLI
|
| 24 |
|
|
|
|
| 25 |
- For multiline PR descriptions, prefer `gh pr edit <number> --body-file <file>` over inline `--body` so shell quoting, `$` env-var names, backticks, and newlines are preserved correctly.
|
| 26 |
- If `gh` reports an invalid token or auth failure, retry the command with `GH_TOKEN` and `GITHUB_TOKEN` unset, for example `env -u GH_TOKEN -u GITHUB_TOKEN gh pr create ...`, so `gh` can use the stored login token instead of a stale environment token.
|
| 27 |
|
|
|
|
| 22 |
|
| 23 |
## GitHub CLI
|
| 24 |
|
| 25 |
+
- Always use the `gh` CLI for GitHub operations such as opening, editing, inspecting, or commenting on PRs and issues.
|
| 26 |
- For multiline PR descriptions, prefer `gh pr edit <number> --body-file <file>` over inline `--body` so shell quoting, `$` env-var names, backticks, and newlines are preserved correctly.
|
| 27 |
- If `gh` reports an invalid token or auth failure, retry the command with `GH_TOKEN` and `GITHUB_TOKEN` unset, for example `env -u GH_TOKEN -u GITHUB_TOKEN gh pr create ...`, so `gh` can use the stored login token instead of a stale environment token.
|
| 28 |
|
backend/usage.py
CHANGED
|
@@ -14,7 +14,6 @@ logger = logging.getLogger(__name__)
|
|
| 14 |
|
| 15 |
HF_BILLING_USAGE_V2_URL = "https://huggingface.co/api/settings/billing/usage-v2"
|
| 16 |
HF_BILLING_URL = "https://huggingface.co/settings/billing"
|
| 17 |
-
HF_INFERENCE_PROVIDERS_USAGE_URL = "https://huggingface.co/settings/billing/usage"
|
| 18 |
HF_INFERENCE_PROVIDERS_PRICING_URL = (
|
| 19 |
"https://huggingface.co/docs/inference-providers/en/pricing"
|
| 20 |
)
|
|
@@ -746,7 +745,6 @@ async def build_usage_response(
|
|
| 746 |
"hf_account": hf_account,
|
| 747 |
"links": {
|
| 748 |
"hf_billing": HF_BILLING_URL,
|
| 749 |
-
"inference_providers_usage": HF_INFERENCE_PROVIDERS_USAGE_URL,
|
| 750 |
"inference_providers_pricing": HF_INFERENCE_PROVIDERS_PRICING_URL,
|
| 751 |
"jobs_pricing": HF_JOBS_PRICING_URL,
|
| 752 |
},
|
|
|
|
| 14 |
|
| 15 |
HF_BILLING_USAGE_V2_URL = "https://huggingface.co/api/settings/billing/usage-v2"
|
| 16 |
HF_BILLING_URL = "https://huggingface.co/settings/billing"
|
|
|
|
| 17 |
HF_INFERENCE_PROVIDERS_PRICING_URL = (
|
| 18 |
"https://huggingface.co/docs/inference-providers/en/pricing"
|
| 19 |
)
|
|
|
|
| 745 |
"hf_account": hf_account,
|
| 746 |
"links": {
|
| 747 |
"hf_billing": HF_BILLING_URL,
|
|
|
|
| 748 |
"inference_providers_pricing": HF_INFERENCE_PROVIDERS_PRICING_URL,
|
| 749 |
"jobs_pricing": HF_JOBS_PRICING_URL,
|
| 750 |
},
|
frontend/src/components/UsageMeter.tsx
CHANGED
|
@@ -259,11 +259,6 @@ export default function UsageMeter() {
|
|
| 259 |
HF billing <OpenInNewIcon sx={{ fontSize: 12 }} />
|
| 260 |
</Link>
|
| 261 |
)}
|
| 262 |
-
{links.inference_providers_usage && (
|
| 263 |
-
<Link href={links.inference_providers_usage} target="_blank" rel="noopener noreferrer" underline="hover" sx={{ display: 'inline-flex', alignItems: 'center', gap: 0.25, fontSize: '0.75rem' }}>
|
| 264 |
-
Inference usage <OpenInNewIcon sx={{ fontSize: 12 }} />
|
| 265 |
-
</Link>
|
| 266 |
-
)}
|
| 267 |
{links.jobs_pricing && (
|
| 268 |
<Link href={links.jobs_pricing} target="_blank" rel="noopener noreferrer" underline="hover" sx={{ display: 'inline-flex', alignItems: 'center', gap: 0.25, fontSize: '0.75rem' }}>
|
| 269 |
Jobs pricing <OpenInNewIcon sx={{ fontSize: 12 }} />
|
|
|
|
| 259 |
HF billing <OpenInNewIcon sx={{ fontSize: 12 }} />
|
| 260 |
</Link>
|
| 261 |
)}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 262 |
{links.jobs_pricing && (
|
| 263 |
<Link href={links.jobs_pricing} target="_blank" rel="noopener noreferrer" underline="hover" sx={{ display: 'inline-flex', alignItems: 'center', gap: 0.25, fontSize: '0.75rem' }}>
|
| 264 |
Jobs pricing <OpenInNewIcon sx={{ fontSize: 12 }} />
|