Repository navigation
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds an “OpenAI-compatible provider” configuration path (with documented DeepSeek examples) and updates the code/docs so the main backporting workflow can be configured via YAML fields and environment variables instead of only hard-coded OpenAI defaults.
Changes:
- Extend
load_yml()to acceptllm_provider,llm_model,llm_base_url,llm_temperature,llm_max_tokens,llm_thinking, and to read keys fromOPENAI_API_KEY/DEEPSEEK_API_KEY. - Update LLM initialization to use the configured provider/model/base URL and add a non-streaming variant for DeepSeek.
- Add a provider configuration guide plus README/config-reference updates and an
.env.exampletemplate.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
src/example.yml |
Adds commented provider configuration examples (DeepSeek). |
src/backporting.py |
Loads provider settings + env keys; gates OpenAI usage tracking by provider. |
src/agent/invoke_llm.py |
Uses configured provider/model/base URL; adds DeepSeek-specific kwargs and non-streaming class. |
README.zh-CN.md |
Links provider guide and documents new provider fields. |
README.md |
Links provider guide and documents new provider fields. |
docs/provider-configuration.md |
New provider configuration guide (OpenAI/DeepSeek/Azure + env vars). |
docs/config-reference.md |
Cross-links provider guide and documents new config fields. |
.env.example |
New template for environment variables used by the workflows. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+58
to
+60
| # OpenAI-compatible LLM configuration | ||
| data.llm_provider = config.get("llm_provider", "openai").lower() | ||
| data.llm_model = config.get("llm_model", "gpt-4-turbo") |
Comment on lines
+172
to
176
| track_openai_usage = not data.use_azure and data.llm_provider == "openai" | ||
| before_usage = get_usage(data.openai_key) if track_openai_usage else None | ||
| agent_executor, llm = initial_agent(project, data, debug_mode) | ||
| try: | ||
| do_backport(agent_executor, project, data, llm, logfile) |
Comment on lines
+9
to
+13
| ## Environment Variables | ||
|
|
||
| ```shell | ||
| cp .env.example .env | ||
| ``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.