Development and Testing
Common commands
Section titled “Common commands”Backend:
cargo fmtcargo checkcargo clippy --workspace --all-targetscargo test --workspacecargo run -p gproxyFrontend:
cd apps/gproxy/frontendpnpm installpnpm typecheckpnpm buildProvider regression scripts
Section titled “Provider regression scripts”Built-in scripts:
tests/provider/curl_provider.shtests/provider/run_channel_regression.sh
Examples:
API_KEY='<key>' tests/provider/curl_provider.sh \ --provider openai \ --method openai_chat \ --model gpt-4.1API_KEY='<key>' tests/provider/run_channel_regression.sh \ --provider openai \ --model gpt-5-nano \ --embedding-model text-embedding-3-smallContributing a new native channel
Section titled “Contributing a new native channel”If custom channel mode is not enough for your upstream (for example custom auth flow, special path rules, custom response normalization, or deeper conversion behavior), contribute a native channel implementation.
Backend integration checklist
Section titled “Backend integration checklist”- Add a channel module under
crates/gproxy-provider/src/channels/<your_channel>/. - Implement needed files:
settings.rs,credential.rs,dispatch.rs,upstream.rs,mod.rs. - Register channel enum and string id in
crates/gproxy-provider/src/channel.rs. - Register channel capability metadata and default dispatch in
crates/gproxy-provider/src/registry.rs. - Add settings parse/serialize wiring in
crates/gproxy-provider/src/settings.rs. - Wire channel execution in
crates/gproxy-provider/src/provider.rs. - If channel supports OAuth or upstream usage, wire corresponding runtime branches.
Admin frontend integration checklist
Section titled “Admin frontend integration checklist”- Add channel files under
apps/gproxy/frontend/src/modules/admin/providers/channels/<your_channel>/. - Register the channel in frontend channel registry so it appears in admin UI.
Validation and regression
Section titled “Validation and regression”cargo checkcargo test --workspacetests/provider/curl_provider.shtests/provider/run_channel_regression.shData directories
Section titled “Data directories”Default paths:
- data dir:
./data - default DB:
sqlite://./data/gproxy.db?mode=rwc - tokenizer cache:
./data/tokenizers
dsn can be switched to mysql/postgres.