Repository navigation
Enhancement: fetchModelPricing support HTTPS_PROXY #12
Description
Activity
What is it? Could you show us the doc on it?
Hi, here's a write-up for http proxy and example in python, I'm not familiar with ts/js so I'm not sure what's the equivalence
HTTP Proxy in Corporate Environments
What is HTTP Proxy?
An HTTP proxy sits between clients and servers, forwarding requests/responses. Corporate environments use proxies for:
- Security: Filter malicious content and unauthorized websites
- Monitoring: Log network traffic for compliance
- Access Control: Block specific domains or content
- Bandwidth: Cache content to reduce external traffic
Environment Variables
HTTP_PROXY=http://proxy.company.com:8080 HTTPS_PROXY=http://proxy.company.com:8080 NO_PROXY=localhost,127.0.0.1,.company.com
Python Example
import requests # Method 1: Explicit proxy proxies = {'http': 'http://proxy.company.com:8080', 'https': 'http://proxy.company.com:8080'} response = requests.get('https://httpbin.org/ip', proxies=proxies) # Method 2: Environment variables (preferred) import os os.environ['HTTPS_PROXY'] = 'http://proxy.company.com:8080' response = requests.get('https://httpbin.org/ip') # Auto-uses proxy
I think
ccusageis only use local file access. why you need proxy?Because it needs to fetch model pricing.... Alternatively, we can add support for "local pricing data file". I'm happy to draft a PR if you think it's the right way to do. Thanks!
I think it is a good idea to change the fetch url with env variable or option of command.
I think either way is fine.
Please make a PR for one of them!In case you miss it @iamwrm
#79 (comment)In case you miss it @iamwrm #79 (comment)
I just tried, the new --offline mode solves my issue. Also closing PR. Thank you!
Reacted by ryoppippi@iamwrm Again thank you for your contribution!!
- added 6 commits that reference this issue
on Jun 8, 2026
Hi, could you add support for HTTPS_PROXY incase the user is behind cooperate proxy?