• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

ehtick / teams-ai / 17110154552
80%

Build:
DEFAULT BRANCH: main
Ran 20 Aug 2025 09:59PM UTC
Jobs 2
Files 300
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

20 Aug 2025 08:42PM UTC coverage: 79.796%. Remained the same
17110154552

push

github

web-flow
[JS] feat: #2560 Add max_completion_tokens handling for gpt-5 (#2561)

OpenAi released gpt-5 in Aug 7, 2025. gpt-5 has deprecated the
max_tokens parameter and old variable temperatures, having an api
similar to the o* models. This change fixes gpt-5 usage and allows users
to choose cheaper/better gpt-5 models as their base model.

Since gpt-5 models allows for tools usage and system messages but do not
allow for temperature, top_p and presence_penalty parameters, a new flag
has been added to toggle on just the parameters handling. This is going
to fix the bad request error that happens when trying to use gpt-5
models using teams-ai

## Linked issues

closes: #2560

## Details

Added a new isGpt5Model flag to toggle off deprecated api parameters,
but keeping tool usage as system prompts.

#### Change details

Create a new flag variable named isGpt5Model to toggle off new
max_completion_tokens and other parameters when detected (just like
reasoning models)

**code snippets**:


```typescript       
const isGpt5Model = model.startsWith('gpt-5')
// --- ... --  
if (isThinkingModel || isGpt5Model) {
          if (params.max_tokens) {
              params.max_completion_tokens = params.max_tokens;
              delete params.max_tokens;
          }
          params.temperature = 1;
          params.top_p = 1;
          params.presence_penalty = 0;
      }
          
```

## Attestation Checklist

- [X] My code follows the style guidelines of this project

- I have checked for/fixed spelling, linting, and other errors
- I have commented my code for clarity
- I have made corresponding changes to the documentation (updating the
doc strings in the code is sufficient)
- My changes generate no new warnings
- I have added tests that validates my changes, and provides sufficient
test coverage. I have tested with:
  - Local testing
  - E2E testing in Teams
- New and existing unit tests pass locally with my changes

Co-authored-by: Lily Du <lilydu@microsoft.com>

1700 of 2618 branches covered (64.94%)

Branch coverage included in aggregate %.

9256 of 11112 relevant lines covered (83.3%)

15.11 hits per line

Jobs
ID Job ID Ran Files Coverage
2 dotnet - 17110154552.2 20 Aug 2025 09:59PM UTC 150
75.69
GitHub Action Run
2 python - 16734090575.2 04 Aug 2025 09:32PM UTC 150
86.71
GitHub Action Run
Source Files on build 17110154552
  • Tree
  • List 300
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #17110154552
  • e0c2be37 on github
  • Prev Build on main (#16761166723)
  • Next Build on main (#17595458526)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc