Skip to content

Docs/link provider configuration guide - #37

Closed
LeiGuo622 wants to merge 4 commits into
mainfrom
docs/link-provider-configuration-guide
Closed

LeiGuo622 wants to merge 4 commits into
mainfrom
docs/link-provider-configuration-guide

Conversation

@LeiGuo622

Copy link
Copy Markdown
Owner

No description provided.

Copilot AI review requested due to automatic review settings May 25, 2026 13:49

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 accept llm_provider, llm_model, llm_base_url, llm_temperature, llm_max_tokens, llm_thinking, and to read keys from OPENAI_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.example template.

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 thread src/backporting.py
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 thread src/backporting.py
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
```
@LeiGuo622 LeiGuo622 closed this May 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants