Update copilot-instructions.md: security hardening and LLM wrapper updates#8
Open
jeongmoon2006 wants to merge 5 commits intoThe-Pocket:mainfrom
Open
Update copilot-instructions.md: security hardening and LLM wrapper updates#8jeongmoon2006 wants to merge 5 commits intoThe-Pocket:mainfrom
jeongmoon2006 wants to merge 5 commits intoThe-Pocket:mainfrom
Conversation
1. Security: Replace all hardcoded api_key="YOUR_API_KEY_HERE" with os.environ.get(...) across every LLM wrapper example (OpenAI, Anthropic, Azure, Gemini) Env config: Add .env file to project structure with API key placeholders; add python-dotenv to requirements; add load_dotenv() to main.py example 2. LLM wrappers: Google: Fix broken indentation, rename "PaLM API" → "Gemini", use gemini-2.5-flash default Azure: Update API version 2023-05-15 → 2024-12-01-preview, use env vars for endpoint/key/deployment Ollama: Update model llama2 → llama3.3 OpenAI/Claude: Make model configurable via env vars 3. Design patterns: Add 6 newer patterns (Streaming, MCP, Memory, Supervisor, HITL, Majority Vote) with link to cookbook 4. Utility functions: Add MCP Tools link to utility list 5. Utils example: Replace buggy Gemini snippet (mismatched use_cache param) with clean OpenAI example
… policies Revise copilot instructions for clarity and detail in agent coding steps Update copilot-instructions.md: refresh outdated content 1. Security: Replace all hardcoded api_key="YOUR_API_KEY_HERE" with os.environ.get(...) across every LLM wrapper example (OpenAI, Anthropic, Azure, Gemini) Env config: Add .env file to project structure with API key placeholders; add python-dotenv to requirements; add load_dotenv() to main.py example 2. LLM wrappers: Google: Fix broken indentation, rename "PaLM API" → "Gemini", use gemini-2.5-flash default Azure: Update API version 2023-05-15 → 2024-12-01-preview, use env vars for endpoint/key/deployment Ollama: Update model llama2 → llama3.3 OpenAI/Claude: Make model configurable via env vars 3. Design patterns: Add 6 newer patterns (Streaming, MCP, Memory, Supervisor, HITL, Majority Vote) with link to cookbook 4. Utility functions: Add MCP Tools link to utility list 5. Utils example: Replace buggy Gemini snippet (mismatched use_cache param) with clean OpenAI example
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.
📝 Overview
This PR focuses on improving security by removing hardcoded API keys, updating outdated LLM API versions (including the transition to Gemini 2.5), and expanding the supported design patterns.
🔒 Security & Configuration
Environment Variables: Replaced all hardcoded api_key="YOUR_API_KEY_HERE" with os.environ.get(...) across all LLM wrapper examples (OpenAI, Anthropic, Azure, Gemini).
Env Setup: Added a .env template file with API key placeholders.
Dependencies: Added python-dotenv to requirements.txt and integrated load_dotenv() into the main.py entry point.
🤖 LLM Wrapper Updates
Google Gemini:
Azure OpenAI:
Ollama: Updated default model from llama2 to llama3.3.
OpenAI/Claude: Made model selection configurable via environment variables for better flexibility.
📚 New Features & Patterns
Design Patterns: Added 6 new patterns to the documentation with links to the cookbook:
MCP Integration: Added Model Context Protocol (MCP) Tools link to the utility list.
🐛 Bug Fixes & Refactoring