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

ehtick / teams-ai / 17110154552 / 2
80%
main: 80%

Build:
DEFAULT BRANCH: main
Ran 20 Aug 2025 10:36PM UTC
Files 150
Run time 3s
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: 75.685%. Remained the same
17110154552.2

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 %.

4818 of 5994 relevant lines covered (80.38%)

27.27 hits per line

Source Files on job dotnet - 17110154552.2
  • Tree
  • List 150
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Build 17110154552
  • e0c2be37 on github
  • Prev Job for on main (#16761166723.2)
  • Next Job for on main (#17595458526.1)
  • 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