Skip to content

update : change model to gpt-oss#24

Open
haddybhaiya wants to merge 3 commits into
mainfrom
mdl-chnge
Open

update : change model to gpt-oss#24
haddybhaiya wants to merge 3 commits into
mainfrom
mdl-chnge

Conversation

@haddybhaiya

Copy link
Copy Markdown
Member

This pull request updates the default model used in the agent/config.py configuration file.

Model update:

  • Changed the MODEL value from "llama-3.3-70b-versatile" to "openai/gpt-oss-20b" to use a different language model.

@haddybhaiya haddybhaiya self-assigned this Jun 30, 2026
@haddybhaiya haddybhaiya added the enhancement New feature or request label Jun 30, 2026
@github-actions

Copy link
Copy Markdown

Automated Code Review Comment:

Bugs

  • The config change sets MODEL to "openai/gpt-oss-20b", but the code uses a Groq client (agent.llm.groq_client). Groq cannot use an OpenAI model string, so generate_review will fail at runtime with an unsupported model error.
  • The change does not update any client‑configuration logic, leaving a mismatch between provider and model.

Improvements

  • Add validation in agent.llm.groq_client (or a central config validator) to ensure the model string matches the expected provider.
  • Separate configuration into PROVIDER and MODEL fields so the correct client can be instantiated automatically.
  • Provide a default fallback model for each provider to avoid accidental mismatches.

Suggestions

  • Use environment variables for both provider and model, e.g., LLM_PROVIDER and LLM_MODEL.
  • Document supported model prefixes per provider (groq/…, openai/…).
  • Add a unit test that verifies generate_review raises a clear error when the model is unsupported for the current client.

If the provider logic is updated accordingly, the change will work; otherwise, it will break the review generation.


Suggested Tests

import importlib
import sys

def test_config_model_value():
    cfg = importlib.import_module("agent.config")
    assert cfg.MODEL == "openai/gpt-oss-20b"

def test_config_model_type():
    cfg = importlib.import_module("agent.config")
    assert isinstance(cfg.MODEL, str)

def test_config_model_non_empty():
    cfg = importlib.import_module("agent.config")
    assert cfg.MODEL != ""

def test_config_module_loaded():
    assert "agent.config" in sys.modules

def test_config_model_not_none():
    cfg = importlib.import_module("agent.config")
    assert cfg.MODEL is not None

@haddybhaiya

Copy link
Copy Markdown
Member Author

LOL !!, review agent thinks that we are using openAI key but its actually groq key and only model is changed from "llama-3.3-70b-versatile" to "openai/gpt-oss-20b"

@haddybhaiya haddybhaiya left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

the fact that we are able to see this review means that model is changed perfectly!
waiting approvals !

Image

@github-actions

Copy link
Copy Markdown

Automated Code Review Comment:

Bugs

  • get_pr_diff is incomplete – the body ends with an orphan ret and no return statement.
  • commit_tests contains syntax errors and unfinished code blocks.
  • The test module snippets are truncated (e.g., test_config_model_non and the normalized string assertion) leading to syntax errors.
  • Several imports (e.g., agent.llm.test_generator) are referenced but not used in the provided context, which can cause ImportError if the module is missing.

Improvements

  • Finish the implementation of get_pr_diff and commit_tests: add proper return values, exception handling, and cleanup of unused variables.
  • Remove or complete the truncated test functions; ensure they are valid and have clear assertions.
  • Consolidate duplicate imports (importlib, sys) into a single block and use them consistently.
  • Add docstrings and type hints to public functions for clarity.

Suggestions

  • Use subprocess.run(..., capture_output=True, text=True) instead of check_output for better error handling and easier access to stdout/stderr.
  • Validate environment variables (GITHUB_HEAD_REF, GITHUB_TOKEN, etc.) before using them in commit_tests.
  • Prefer pytest fixtures for repeated setup (e.g., loading agent.config).
  • Add a final newline to all files to satisfy linters.
  • Keep MODEL as a constant in agent/config.py but provide a fallback or validation function to ensure it matches expected patterns.
  • Consider parameterizing tests to avoid code duplication.

Suggested Tests

import importlib
import sys

def test_config_model_value():
    cfg = importlib.import_module("agent.config")
    assert cfg.MODEL == "openai/gpt-oss-20b"

def test_config_model_type():
    cfg = importlib.import_module("agent.config")
    assert isinstance(cfg.MODEL, str)

def test_config_model_non_empty():
    cfg = importlib.import_module("agent.config")
    assert cfg.MODEL != ""

def test_config_module_loaded():
    assert "agent.config" in sys.modules

def test_config_model_not_none():
    cfg = importlib.import_module("agent.config")
    assert cfg.MODEL is not None

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants