-
Notifications
You must be signed in to change notification settings - Fork 2
ci: fix workflow required-check names for feat/sdk-openapi-cherry-pick #509
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,16 +1,3 @@ | ||
| # workflow_file|job_name | ||
| pr-test-build.yml|go-ci | ||
| pr-test-build.yml|quality-ci | ||
| pr-test-build.yml|quality-staged-check | ||
| pr-test-build.yml|fmt-check | ||
| pr-test-build.yml|golangci-lint | ||
| pr-test-build.yml|route-lifecycle | ||
| pr-test-build.yml|provider-smoke-matrix | ||
| pr-test-build.yml|provider-smoke-matrix-cheapest | ||
| pr-test-build.yml|test-smoke | ||
| pr-test-build.yml|pre-release-config-compat-smoke | ||
| pr-test-build.yml|distributed-critical-paths | ||
| pr-test-build.yml|changelog-scope-classifier | ||
| pr-test-build.yml|docs-build | ||
| pr-test-build.yml|ci-summary | ||
| pr-test-build.yml|build | ||
| pr-path-guard.yml|ensure-no-translator-changes |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| name: Auto Merge Gate | ||
|
|
||
| on: | ||
| pull_request_target: | ||
| types: | ||
| - opened | ||
| - reopened | ||
| - ready_for_review | ||
| - synchronize | ||
| - labeled | ||
| pull_request_review: | ||
| types: | ||
| - submitted | ||
|
|
||
| permissions: | ||
| contents: read | ||
| pull-requests: write | ||
|
|
||
| jobs: | ||
| enable-automerge: | ||
| if: | | ||
| (github.event_name != 'pull_request_review') || | ||
| (github.event.review.state == 'APPROVED') | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Enable auto-merge for labeled PRs | ||
| if: | | ||
| contains(github.event.pull_request.labels.*.name, 'automerge') && | ||
| !contains(github.event.pull_request.labels.*.name, 'do-not-merge') | ||
| uses: peter-evans/enable-pull-request-automerge@v3 | ||
| with: | ||
| github-token: ${{ secrets.GITHUB_TOKEN }} | ||
| merge-method: squash | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,6 +8,7 @@ permissions: | |
|
|
||
| jobs: | ||
| build: | ||
| name: build | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -9,6 +9,7 @@ import ( | |||||||||||||||||||||||||
| configaccess "github.com/router-for-me/CLIProxyAPI/v6/pkg/llmproxy/access/config_access" | ||||||||||||||||||||||||||
| "github.com/router-for-me/CLIProxyAPI/v6/pkg/llmproxy/config" | ||||||||||||||||||||||||||
| sdkaccess "github.com/router-for-me/CLIProxyAPI/v6/sdk/access" | ||||||||||||||||||||||||||
| sdkconfig "github.com/router-for-me/CLIProxyAPI/v6/sdk/config" | ||||||||||||||||||||||||||
| log "github.com/sirupsen/logrus" | ||||||||||||||||||||||||||
| ) | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
|
|
@@ -85,7 +86,16 @@ func ApplyAccessProviders(manager *sdkaccess.Manager, oldCfg, newCfg *config.Con | |||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| existing := manager.Providers() | ||||||||||||||||||||||||||
| configaccess.Register((*config.SDKConfig)(&newCfg.SDKConfig)) | ||||||||||||||||||||||||||
| sdkCfg := sdkconfig.SDKConfig{ | ||||||||||||||||||||||||||
| ProxyURL: newCfg.SDKConfig.ProxyURL, | ||||||||||||||||||||||||||
| ForceModelPrefix: newCfg.SDKConfig.ForceModelPrefix, | ||||||||||||||||||||||||||
| RequestLog: newCfg.SDKConfig.RequestLog, | ||||||||||||||||||||||||||
| APIKeys: newCfg.SDKConfig.APIKeys, | ||||||||||||||||||||||||||
| PassthroughHeaders: newCfg.SDKConfig.PassthroughHeaders, | ||||||||||||||||||||||||||
| Streaming: sdkconfig.StreamingConfig(newCfg.SDKConfig.Streaming), | ||||||||||||||||||||||||||
| NonStreamKeepAliveInterval: newCfg.SDKConfig.NonStreamKeepAliveInterval, | ||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||
| configaccess.Register(&sdkCfg) | ||||||||||||||||||||||||||
|
Comment on lines
+89
to
+98
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
# Check SDKConfig alias definition in config package
echo "=== Searching for SDKConfig alias in pkg/llmproxy/config ==="
fd 'sdk_types.go' --type f | xargs -I {} sh -c 'echo "File: {}"; cat -n "{}"'
echo ""
echo "=== Searching for SDKConfig struct in sdkconfig package ==="
fd '*.go' -path '*/sdkconfig/*' --type f | head -20
echo ""
echo "=== Searching for SDKConfig struct definition ==="
rg -n 'type\s+SDKConfig\s+struct' --type go -A 50Repository: KooshaPari/cliproxyapi-plusplus Length of output: 4120 🏁 Script executed: #!/bin/bash
# Check the specific lines in reconcile.go and surrounding context
echo "=== Checking reconcile.go lines 80-105 ==="
sed -n '80,105p' pkg/llmproxy/access/reconcile.go | cat -n -vRepository: KooshaPari/cliproxyapi-plusplus Length of output: 1538 🏁 Script executed: #!/bin/bash
# Search for the types in imports to understand the relationship
echo "=== Check imports in reconcile.go ==="
head -30 pkg/llmproxy/access/reconcile.go | cat -n
echo ""
echo "=== Search for config.SDKConfig type definition ==="
rg -n 'SDKConfig' pkg/llmproxy/config/ --type go | head -20Repository: KooshaPari/cliproxyapi-plusplus Length of output: 1660 Use direct assignment instead of manual field-by-field copying. Since Suggested change- sdkCfg := sdkconfig.SDKConfig{
- ProxyURL: newCfg.SDKConfig.ProxyURL,
- ForceModelPrefix: newCfg.SDKConfig.ForceModelPrefix,
- RequestLog: newCfg.SDKConfig.RequestLog,
- APIKeys: newCfg.SDKConfig.APIKeys,
- PassthroughHeaders: newCfg.SDKConfig.PassthroughHeaders,
- Streaming: sdkconfig.StreamingConfig(newCfg.SDKConfig.Streaming),
- NonStreamKeepAliveInterval: newCfg.SDKConfig.NonStreamKeepAliveInterval,
- }
+ sdkCfg := newCfg.SDKConfig
configaccess.Register(&sdkCfg)📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||
| providers, added, updated, removed, err := ReconcileProviders(oldCfg, newCfg, existing) | ||||||||||||||||||||||||||
| if err != nil { | ||||||||||||||||||||||||||
| log.Errorf("failed to reconcile request auth providers: %v", err) | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,43 +1,8 @@ | ||
| // Package config provides configuration types for CLI Proxy API. | ||
| // This file contains SDK-specific config types that are used by internal/* packages. | ||
| // Package config provides configuration types for the llmproxy server. | ||
| package config | ||
|
|
||
| // SDKConfig represents the SDK-level configuration embedded in Config. | ||
| type SDKConfig struct { | ||
| // ProxyURL is the URL of an optional proxy server to use for outbound requests. | ||
| ProxyURL string `yaml:"proxy-url" json:"proxy-url"` | ||
| import sdkconfig "github.com/router-for-me/CLIProxyAPI/v6/sdk/config" | ||
|
|
||
| // ForceModelPrefix requires explicit model prefixes (e.g., "teamA/gemini-3-pro-preview") | ||
| // to target prefixed credentials. When false, unprefixed model requests may use prefixed | ||
| // credentials as well. | ||
| ForceModelPrefix bool `yaml:"force-model-prefix" json:"force-model-prefix"` | ||
|
|
||
| // RequestLog enables or disables detailed request logging functionality. | ||
| RequestLog bool `yaml:"request-log" json:"request-log"` | ||
|
|
||
| // APIKeys is a list of keys for authenticating clients to this proxy server. | ||
| APIKeys []string `yaml:"api-keys" json:"api-keys"` | ||
|
|
||
| // PassthroughHeaders controls whether upstream response headers are forwarded to downstream clients. | ||
| // Default is false (disabled). | ||
| PassthroughHeaders bool `yaml:"passthrough-headers" json:"passthrough-headers"` | ||
|
|
||
| // Streaming configures server-side streaming behavior (keep-alives and safe bootstrap retries). | ||
| Streaming StreamingConfig `yaml:"streaming" json:"streaming"` | ||
|
|
||
| // NonStreamKeepAliveInterval controls how often blank lines are emitted for non-streaming responses. | ||
| // <= 0 disables keep-alives. Value is in seconds. | ||
| NonStreamKeepAliveInterval int `yaml:"nonstream-keepalive-interval,omitempty" json:"nonstream-keepalive-interval,omitempty"` | ||
| } | ||
|
|
||
| // StreamingConfig holds server streaming behavior configuration. | ||
| type StreamingConfig struct { | ||
| // KeepAliveSeconds controls how often the server emits SSE heartbeats (": keep-alive\n\n"). | ||
| // <= 0 disables keep-alives. Default is 0. | ||
| KeepAliveSeconds int `yaml:"keepalive-seconds,omitempty" json:"keepalive-seconds,omitempty"` | ||
|
|
||
| // BootstrapRetries controls how many times the server may retry a streaming request before any bytes are sent, | ||
| // to allow auth rotation / transient recovery. | ||
| // <= 0 disables bootstrap retries. Default is 0. | ||
| BootstrapRetries int `yaml:"bootstrap-retries,omitempty" json:"bootstrap-retries,omitempty"` | ||
| } | ||
| // Keep SDK types aligned with public SDK config to avoid split-type regressions. | ||
| type SDKConfig = sdkconfig.SDKConfig | ||
| type StreamingConfig = sdkconfig.StreamingConfig |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: KooshaPari/cliproxyapi-plusplus
Length of output: 1186
🏁 Script executed:
Repository: KooshaPari/cliproxyapi-plusplus
Length of output: 2427
Pin the GitHub Action to an immutable commit SHA.
Line 30 uses a mutable tag (
@v3) in apull_request_targetworkflow with write permissions (pull-requests: write). Pin to a full commit SHA to reduce supply-chain risk.Suggested change
🤖 Prompt for AI Agents